Normalization of poly22 fitsurface

7 views (last 30 days)
laura bagnale
laura bagnale on 23 Jun 2021
Hello everyone,
I hope someone could help me. I would like to find a way to normalize poly22.
I have a set of X,Y,Z points in space, and I used fs poly22 to fit them with a surface.
This is my code:
X = [0.1; 0.05; 0.5; 0.5; 0.05; 0.4];
Y = [2.8; 5.5; 5.5; 1.4; 1.4; 2];
Z = [0.9; 0.3; 0; 0.2; 0.6; 1];
%plotting data and fitsurface
plot3(X,Y,Z,'or');
fs=fit([X,Y],Z, 'poly22','Normalize','on');
plot(fs, [X,Y],Z)
Linear model Poly22:
fs1(x,y) = p00 + p10*x + p01*y + p20*x^2 + p11*x*y + p02*y^2
where x is normalized by mean 0.2933 and std 0.2741
and where y is normalized by mean 2.683 and std 1.946
Coefficients:
p00 = 1.076
p10 = -0.01815
p01 = 0.08533
p20 = -0.5503
p11 = -0.07016
p02 = -0.2431
I would like my surface to be contained in a cube of edges 0-1 in the three directions, is there a way to do it?
Thank you very much for your help!
Kind Regards,
Laura

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by