How do I replicate curve fit figure with an equation?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!