Non Linear curve fitting
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
Hi,
I have an equation of the following form.
Y = K1 * (( x1 - (K2*x2) + (K3*x3)) * (x4 - x2))
x1 is fixed at 1.5. The models accounts for behavior in a nonlinear region. Its a current equation which has a slight nonlinear behavior.
The points I have are the following.. x4 varies from 0.51 - 0.6 and for each x4 I have x3 varying from a nominal value +/- 75mV. The nominal value of x3 will be different for different x4. And again for each x3+/- 75mV I have x2 varying from 0.25-0.5.
Essentially there are two nested loops. x2 always runs from 0.25-5 for every x3+/-75mV for every x4 between 0.51 - 0.6 .
Since I will have a Y for every combination of x2,x3,x4. I read it as a matrix with the input combinations of x2,x3,x4 as say INP and the output Y as a matrix OUT.
Then I used the following to find my coefficients.
Z = (INP' * INP ) \ (INP' * OUT )
The error I am getting is around 15% but I want to have less than 5% error. Could someone please help me in this?
Thanks in advance for the help.
Thanks, Venkat
1 Kommentar
Venkatesa
am 31 Aug. 2011
Antworten (1)
Walter Roberson
am 31 Aug. 2011
0 Stimmen
Sounds like fmincons() might perhaps be suitable for this, but if you have the curvefitting toolbox or optimization toolbox then there are more specific tools there.
2 Kommentare
Venkatesa
am 31 Aug. 2011
Walter Roberson
am 31 Aug. 2011
Saying that "x4 varies from 0.51 - 0.6" is a constraint on x4; likewise you have a constraint on x2 I think (I might be misreading.) You might be able to program some of the other constraints through the A*x<=b parameter to fmincon() -- if not exactly then perhaps close enough as to meaningfully reduce the search domain.
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!