a=[1 10 4 9.3;
1 50 3 4.8;
1 100 4 8.9;
1 100 2 6.5;
1 50 2 4.2;
1 80 2 6.2;
1 75 3 7.4;
1 65 4 6;
1 77 3 8.9;
1 90 3 7.6;
1 90 2 6.1]
figure
plot(a(:,2),a(:,4),'+')
figure
plot(a(:,3),a(:,4),'+')
[b,bint,r,rint,stats] = regress(a(:,4),a(:,[1,2,3]))
回车,得到结果:
b =
1.9165
0.0154
1.3356
bint =
-3.9161 7.7490
-0.0271 0.0578
-0.0310 2.7021
r =
1.8878
-1.8907
0.1062
0.3774
-1.1551
0.3844
0.3256
-2.2565
1.7949
0.2953
0.1309
rint =
0.5289 3.2466
-4.7793 0.9979
-2.4188 2.6313
-2.7113 3.4661
-3.8677 1.5574
-2.8186 3.5873
-3.1109 3.7620
-4.6569 0.1439
-1.2708 4.8605
-3.0346 3.6252
-3.0632 3.3250
stats =
0.3888 2.5442 0.1396
y=1.9165+ 0.0154x1+1.3356x2
模型F=2.5442,概率p=0.1396,不是统计显著。