<>function n2=test(m,p,n1)%m--teacher;p--text;i--i=1;
qx=1:1:n1;
qx=qx-qx;
i=1;
j=1;
t=0;
while j<n1+1
while i<p+1
x=randn(1,m)+8;
t=t+x;
end
qx(j)=t;
t=t-t;
j=j+1;
i=1;
end
while i<n1+1
sum(qx(i));
i=i+1;
end
qx=(1/m)*(1/p)*qx;
n2=sum(qx)/n1;
</P>
<>老是出现这个错误:>> n2=test(10,6,20)
??? Undefined function or variable 'test'.
</P>
[此贴子已经被作者于2004-5-3 19:41:03编辑过]
|