Polynomial fitting with multiple variables and unequal matrix length
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, Good day. Thanks in advance. I'm having problem with investigating relationship with some data. Say, A=1,2,3.. and for each A, there are 20 values of B and C correspond to B (I mean C depends on B). I can easily find a polynomial relationship between B and C but how can I create relationship between A, B and C? Please note that, I'm actually a new in Matlab, thus don't take it otherwise if the question seems somehow not appropriate.
In simple:
A=[1 2 3 4 5].
For A=1, B=[... ... ... 20 values] and C=[... ... ... 20 values]
For A=2, B=[... ... ... 20 values] and C=[... ... ... 20 values]
....
For A=5, B=[... ... ... 20 values] and C=[... ... ... 20 values].
Need to have a relationship between A, B and C.
Thanks again.
0 Kommentare
Antworten (1)
Iain
am 21 Aug. 2014
It kinda depeneds how those variables interact.
A "simple" method is to use the polyfit function to get a suitable relationship, for each value of A, for B to relate to C. (Quadratic/cubic/whatever).
So you get, for A = 1, C = d + eB + fB^2-hB^4 (or whatever)
Then you have 5 "A" values, 5 d values, on which you can do the same again...
To get something like d = A/4 + 0.1; e = A^2/20
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!