![]() |
大家帮我看看这个程序怎么回事
程序1:
eps = (0.1:0.1:5); %epsilon Fai_L = acos(1-2*eps); %积分限。 Fai_L(eps>1)=pi; %epsilon 大于1积分限设为pi syms f e int_f = (1-(1-cos(f))/(2*e))^(3/2)*cos(f)/(2*pi); %被积函数 Jr = zeros(size(eps)); %初始化Jr for i=1:length(eps) Jr(i) = double(int(subs(int_f,e,eps(i)),f,-Fai_L(i),Fai_L(i))); %积分 end plot(eps,real(Jr)); %画图 xlabel 'ε' ylabel 'Jr' 程序1运行后可画出图形。 稍微改动下变为程序2 eps = (0.1:0.1:5); %epsilon Fai_L = acos(1-2*eps); %积分限。 Fai_L(eps>1)=pi; %epsilon 大于1积分限设为pi syms f e int_f = (1-(1-cos(f))/(2*e))^(1.1)*cos(f)/(2*pi); %被积函数 Jrl = zeros(size(eps)); %初始化Jr for i=1:length(eps) Jrl(i) = double(int(subs(int_f,e,eps(i)),f,-Fai_L(i),Fai_L(i))); %积分 end plot(eps,real(Jrl)); %画图 xlabel 'ε' ylabel 'Jr' 就无法运行了。显示错误,两个的改动之处是将1中的1.5改为1.1,我的目的是想解出2中的那个积分方程,但是总是出现错误 ??? Error using ==> mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array. If the input expression contains a symbolic variable, use the VPA function instead. Error in ==> sym.sym>sym.double at 927 Xstr = mupadmex('mllib::double', S.s, 0); Error in ==> jrlimage at 13 Jrl(i) = double(int(subs(int_f,e,eps(i)),f,-Fai_L(i),Fai_L(i))); %积分 |
所有时间均为北京时间。现在的时间是 03:47。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.