关于solve命令的问题
新手求助,现编了一个循环程序,里面用到solve函数,但循环只进行了一步,就提示出错!??? Error using ==> solve at 162Unable to find closed form solution 。先将程序列于下方,请高人指教!谢谢
主程序
clc
clear
Down_standard = -2;
Up_standard = 2;
for i=1:4
miu_standard = 0;
theda_standard = double(fun_norm(Down_standard,Up_standard));
Up_standard = norminv(0.9772,miu_standard,theda_standard);
Down_standard = norminv(0.0228,miu_standard,theda_standard);
end
子程序
function y= fun_norm(a,b)
syms t theda
y = solve(int(exp(-t^2/(2*theda^2))/(theda*(2*pi)^0.5),t,a,b)-1);
我个人认为这个程序的问题在于如何在循环体里求积分,似乎我给的积分只能积一次,不能循环,请大师们指教! 个人水平专业有限, LZ的问题不是很深入了解, 但直觉好像使用数值解的方式即可! 请LZ自行考量下!
回复 楼主 yxhhit 的帖子
??? Error using ==> solve at 162 Unable to find closed form solution出错提示应该是solve不能给出解析解,参考数值解法,help fsolve
页:
[1]