matlab 中 regress函数警告:Warning: X is rank deficient to within machine precision.具体程序:n=20; y=[21.3 22.2 23.4 21.3 21.3 17.5 19.2 25.4 17.6 17.5 17.0 23.7 29.0 22.1 17.0 25.1 28.4 29.2 27.6 25.1 ]';x1=[1.1 1.1 1.1 1.1 1.1 1.1 1.1
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/04 02:54:37
matlab 中 regress函数警告:Warning: X is rank deficient to within machine precision.具体程序:n=20; y=[21.3 22.2 23.4 21.3 21.3 17.5 19.2 25.4 17.6 17.5 17.0 23.7 29.0 22.1 17.0 25.1 28.4 29.2 27.6 25.1 ]';x1=[1.1 1.1 1.1 1.1 1.1 1.1 1.1
matlab 中 regress函数警告:Warning: X is rank deficient to within machine precision.
具体程序:
n=20;
y=[21.3 22.2 23.4 21.3 21.3 17.5 19.2 25.4 17.6 17.5 17.0 23.7 29.0 22.1 17.0 25.1 28.4 29.2 27.6 25.1 ]';
x1=[1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 ]';
x2=[2.1 3.1 4.1 6.1 7.1 2.1 3.1 4.1 6.1 7.1 2.1 3.1 4.1 6.1 7.1 2.1 3.1 4.1 6.1 7.1]';
x3=[0.2 0.2 0.2 0.2 0.2 1 1 1 1 1 1.8 1.8 1.8 1.8 1.8 2.6 2.6 2.6 2.6 2.6]';
X=[ones(size(y)) x1.^2 x2.^2 x2.^2 x1 x2 x3 x1.*x2 x1.*x3 x2.*x3 ];%%首先生成与y 矩阵元素相同的矩阵 5个
[b,bint,r,rint,stats] = regress(y,X);
b;bint;r;rint;stats;
rcoplot(r,rint)
用regress函数 拟合二元二次方程
matlab 中 regress函数警告:Warning: X is rank deficient to within machine precision.具体程序:n=20; y=[21.3 22.2 23.4 21.3 21.3 17.5 19.2 25.4 17.6 17.5 17.0 23.7 29.0 22.1 17.0 25.1 28.4 29.2 27.6 25.1 ]';x1=[1.1 1.1 1.1 1.1 1.1 1.1 1.1
把x1=[1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 ]';
shanchu