Working precision vs Machine precision

18 vues (au cours des 30 derniers jours)
sohaib.dwairi@gmail.com Dwairi
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.*

Réponses (0)

Catégories

En savoir plus sur Descriptive Statistics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by