How to find parameters in a 3rd order equation

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)

Torsten
Torsten on 24 Jan 2018
Edited: Torsten on 24 Jan 2018
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

Asked:

on 24 Jan 2018

Edited:

on 24 Jan 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!