|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
function d1()
fid=fopen('d1.txt','w');
syms x y f o w
for x=0.5:0.5:10
eqn=(1193.662074+1193.662074*i)*besselj(1,(.2513274122e-1+.2513274122e-1*i)*x^.5)/x^1.5/besselj(0,(.2513274122e-1+.2513274122e-1*i)*x^.5)/y/(1+(113.1768484+113.1768484*i)*besselj(1,(.2513274122e-1+.2513274122e-1*i)*x^.5)/x^1.5/besselj(0,(.2513274122e-1+.2513274122e-1*i)*x^.5)*log(1+1350.000000/(1.341640787+y^.5)^2))+(1.8-y)/(1.8+y);
eq=vpa(eqn,4);
f=solve(eq,y);
fprintf(fid,'%f',x);
fprintf(fid,'%s',' ');
fprintf(fid,'%f',double(real(f)));
fprintf(fid,'%s',' ');
fprintf(fid,'%f',double(imag(f)));
fprintf(fid,'%s\n','');
clear maplemex;
end
sta=fclose(fid);
运行后出现
Warning: Explicit solution could not be found.
> In solve at 140
In sym.solve at 49
In d1 at 6
??? Function 'eval' is not defined for values of class 'double'.
Error in ==> eval at 44
[varargout{1:nargout}] = builtin('eval', varargin{:});
Error in ==> sym.double at 45
D = reshape(eval(X),siz);
Error in ==> d1 at 9
fprintf(fid,'%f',double(real(f)));
但是在maple中是有解的,
请高手帮忙! |
|