Hi, I would like to find the six coefficients a,b,c,d, e and f of the equation z=a+b*x+c*y+d*x^2+e*x*y+f*y^2 to fit data contained in the matrix A=3x6 (with first row : z values, second row: x values and third row : y values)
Thank you very much

Antworten (1)

Star Strider
Star Strider am 27 Jul. 2015
Bearbeitet: Star Strider am 27 Jul. 2015

0 Stimmen

The easiest way:
z = A(1,:);
x = A(2,:);
y = A(3,:);
B = [ones(size(z(:))) x(:) y(:) x(:).^2 x(:).*y(:) y(:).^2]\z(:);
a = B(1)
b = B(2)
c = B(3)
d = B(4)
e = B(5)
f = B(6)

Kategorien

Mehr zu Curve Fitting Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 27 Jul. 2015

Bearbeitet:

am 27 Jul. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by