蓝蔷_小k 发表于 2014-10-20 16:54 
好的。谢谢!另外请问下载之后应该怎么加载ols呢?
记得直接能调用ols函数啊
看看当时学matlab时运行ols:
load t01.data
y = t01(:,3);
nobs = length(y);
x = [ones(nobs,1) t01(:,1) t01(:,2)];
% set up variable names
vnames = strvcat('first','constant','peoagr','machine');
% notice:do not lost 'constant' variable names
result = ols(y,x); % Ordinary Least-squares Estimates function
prt(result,vnames); % print results
plt(result); % plot drawing