声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2163|回复: 2

[计算数学] 求助符号函数方程问题

[复制链接]
发表于 2008-11-19 22:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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中是有解的,
请高手帮忙!
回复
分享到:

使用道具 举报

发表于 2008-11-20 09:59 | 显示全部楼层

回复 楼主 wzpedison 的帖子

我这里直接运行到死机了,
matlab的符号计算功能比maple的差远了,是不是这个方程在matlab里面找不到解呢?
发表于 2008-11-20 15:07 | 显示全部楼层
还是推荐maple求解,能有结果不就可以了么?
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-21 10:52 , Processed in 0.049280 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表