帮看看一小段matlab程序# Computation - 科学计算
d*a
1 楼
M=36;
theta=zeros(1,M);
pho=[1 0.5;0.5 1];
syms u;
syms v;
s=[norminv(u);norminv(v)];
for i=1:M
theta(i)=int(int(10*(exp(-0.5*s'*(inv(pho)-eye(2))*s)/sqrt(det(pho))),u,0,1)
,v,0,1);
end
theta
===============================================
??? Error using ==> <
Function 'Error in ==> C:\MATLAB6p1\toolbox\stats\norminv.m
On line 36 ==> k = find(sigma <= 0 | p < 0 | p > 1 | isnan(p));
如何修改才可以正确运行?或者有没有什么简单函数可以近似norminv函数?谢谢
theta=zeros(1,M);
pho=[1 0.5;0.5 1];
syms u;
syms v;
s=[norminv(u);norminv(v)];
for i=1:M
theta(i)=int(int(10*(exp(-0.5*s'*(inv(pho)-eye(2))*s)/sqrt(det(pho))),u,0,1)
,v,0,1);
end
theta
===============================================
??? Error using ==> <
Function 'Error in ==> C:\MATLAB6p1\toolbox\stats\norminv.m
On line 36 ==> k = find(sigma <= 0 | p < 0 | p > 1 | isnan(p));
如何修改才可以正确运行?或者有没有什么简单函数可以近似norminv函数?谢谢