Second degree polynomial fit
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone,
R = c0-c1*(Tp)+c2*(Tp)^2,
I have a second degree polynomial function, where I have to fit the three constants (c0,c1,c2) The values for R and Tp are fixed, where R=998.9 and Tp=24.0 Can anyone help me out with this problem?
Regards,
Marc
0 Kommentare
Antworten (1)
Star Strider
am 22 Jul. 2016
Bearbeitet: Star Strider
am 22 Jul. 2016
You have one equation in three unknowns, so there are an infinity of solutions. The solution you get depends on your initial parameter estimates:
R=998.9;
Tp=24.0;
f = @(c) c(1) - c(2).*Tp + c(3).*Tp^2 - R;
C0 = [1; 1; 1];
C = fsolve(f, C0)
One set of solutions with this ‘C0’:
C =
1.0013
0.9678
1.7728
8 Kommentare
Star Strider
am 25 Jul. 2016
My pleasure!
With only one value of ‘Tp’, regardless of the number of ‘R’ values you have, they are arbitrary. Choose a value for ‘c0’, then:
c1 = c0/Tp;
Since you’ve already calculated ‘c2’ from ‘Tp’ and ‘R’, neglecting ‘c0’ and ‘c1’ (assuming they are negligible), the remaining terms have to equate to 0.
Siehe auch
Kategorien
Mehr zu Get Started with Curve Fitting Toolbox 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!