How to find parameters in a 3rd order equation
Show older comments
Hello,
I have 2 known matrices X and Y and I have this 3rd order equation: Y=a+b*X+c*X*X+d*X*X*X
How can I find a b and c?
Answers (1)
Y=Y(:);
I=ones(numel(Y),1);
X1=X;
X2=X1*X;
X3=X2*X;
X1=X1(:);
X2=X2(:);
X3=X3(:);
A=[I X1 X2 X3];
par=A\Y;
a=par(1)
b=par(2)
c=par(3)
d=par(4)
Best wishes
Torsten.
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!