这个matlab程序哪里出错了?求指教
x=[53 66.64 68.3 70.4 78.4 84.3 74.5 83.9 89.6 86.2 108.5 83]';
X=[ones(12,1)x];
Y=[6530 6930 7310 7610 7900 8220 7990 8220 8530 8880 9380 9080]';
[b,bint,r,rint,stats]=resress(Y,X);
b,bint,stats
补充:resress改为regress
追问:x=[53 66.64 68.3 70.4 78.4 84.3 74.5 83.9 89.6 86.2 108.5 83]';
X=[ones(12,1);x];
Y=[6530 6930 7310 7610 7900 8220 7990 8220 8530 8880 9380 9080]';
[b,bint,r,rint,stats]=regress(Y,X);
b,bint,stats
那这个呢,还是提示错误Error using ==> regress
The number of rows in Y must equal the number of rows in X.
不好意思,写错了
X=[ones(12,1),x];
我把resress改为regress了,我改为点乘之后还是有问题,少一个b的值
x=[53 66.64 68.3 70.4 78.4 84.3 74.5 83.9 89.6 86.2 108.5 83]';
X=[ones(12,1).*x];
Y=[6530 6930 7310 7610 7900 8220 7990 8220 8530 8880 9380 9080]';
[b,bint,r,rint,stats]=regress(Y,X);
b,bint,stats
b =
100.7539
bint =
95.1467 106.3611
stats =
1.0e+005 *
0.0000 NaN NaN 4.9866