Working precision vs Machine precision

1 次查看(过去 30 天)
I am trying to generate the surface response of Z as a function of X and Y by utilizing the mathematical correlation shown within the following code of MATLAB, but I am facing the two warnings shown below. Please help me.
X=[30;30;30;30;50;50;50;50];
Y=[0;300;600;900;0;300;600;900];
Z=[0.378; 0.553; 0.615; 0.738; 1.069; 1.573; 0.288; 1.246];
N=[ones(size(X)) X.^2/(Y+1) X.^2.*Y X X.^2.*Y.^2 Y];
b=regress (Z, N)
Warning: N is rank deficient to within machine precision.
In regress at 84
b =
0
0
0
0
0.4771
0
0
0
0
-0.0000
-0.0014
0.0000
0.0007
scatter3 (X,Y,Z,'filled')
hold on
Xfit = min(X):0.1:max(X);
Yfit = min(Y):4.5:max(Y);
[xfit,yfit]=meshgrid(Xfit,Yfit);
Zfit = b(1) + b(2)(xfit.^2/(yfit+1)) + b(3)(xfit.^2.yfit) + b(4)(xfit) + b(5)*(xfit.^2.yfit.^2) + b(6)(yfit);
Warning: Matrix is singular to working precision.*

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Descriptive Statistics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by