How do I replicate curve fit figure with an equation?
1 view (last 30 days)
Show older comments
I would like to replicate the following plane, which was plotted with the curve fitting toolbox.
The toolbox gave me this information for the plane:
% Linear model Poly22:
% ans(x,y) = p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2
% where x is normalized by mean 14.91 and std 0.5073
% and where y is normalized by mean -7.804 and std 23.72
% Coefficients (with 95% confidence bounds):
% p00 = -3.562 (-3.609, -3.516)
% p10 = -0.0439 (-0.1117, 0.02388)
% p01 = 22.79 (22.72, 22.85)
% p20 = 0.04982 (-0.08557, 0.1852)
% p11 = 0.06292 (-0.1923, 0.3182)
% p02 = 1.543 (1.41, 1.675)
But when I plot it with the code
p00 = -3.562 ; p10 = -0.0439 ; p01 = 22.79 ;
p20 = 0.04982 ; p11 = 0.06292 ; p02 = 1.543 ;
syms x y
z = p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2;
fsurf(z, [13.5 16], 'edgecolor', 'none');
xlabel('x'); ylabel('y'); zlabel('z');
I do not get the proper coordinates and end up with this and I'm not sure how to fix it:
I think it has to do with the 'normalized by mean xx and std yy ' but I don't know how it works
0 Comments
Answers (1)
See Also
Categories
Find more on Interpolation 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!