声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1751|回复: 3

[综合讨论] matlab求导数为什么老出错

[复制链接]
发表于 2010-3-5 00:47 | 显示全部楼层 |阅读模式

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

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

x
我想对下列函数求导数,但是球出来的导数虚数单位i就自动变为大写的I了,始终找不到原因,哪位能告诉我怎么解决啊,而且数值变成这种分数相处的形式,也不知道怎么解决

syms kxB
b6 =bessely(0, (49*(1925653029807063/140737488355328 - (803108098859253*i)/36028797018963968 - kxB^2)^(1/2))/2000)*besselj(1, (411*(1925653029807063/140737488355328 - (803108098859253*i)/36028797018963968 - kxB^2)^(1/2))/5000)*besselj(1, (49*(961261823162635/70368744177664 - kxB^2)^(1/2))/2000)
df=diff(b6)

>> diff(b6)

ans =

49/2000*kxB/(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2)*besselj(1, 49/2000*(961261823162635/70368744177664 - kxB^2)^(1/2))*bessely(1, 49/2000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2))*besselj(1, 411/5000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2)) + 49/2000*kxB/(961261823162635/70368744177664 - kxB^2)^(1/2)*bessely(0, 49/2000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2))*besselj(1, 411/5000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2))*(2000/49/(961261823162635/70368744177664 - kxB^2)^(1/2)*besselj(1, 49/2000*(961261823162635/70368744177664 - kxB^2)^(1/2)) - besselj(0, 49/2000*(961261823162635/70368744177664 - kxB^2)^(1/2))) + 411/5000*kxB/(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2)*besselj(1, 49/2000*(961261823162635/70368744177664 - kxB^2)^(1/2))*bessely(0, 49/2000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2))*(5000/411/(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2)*besselj(1, 411/5000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2)) - besselj(0, 411/5000*(1925653029807063/140737488355328 - kxB^2 - 803108098859253/36028797018963968*I)^(1/2)))
回复
分享到:

使用道具 举报

发表于 2010-3-5 08:12 | 显示全部楼层
刚试下, 我的版本是v5.3
?diff(b6)

ans =

49/2000*bessely(1,49/2000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2))/(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2)*kxB*besselj(1,411/5000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2))*besselj(1,49/2000*(961261823162635/70368744177664-kxB^2)^(1/2))-411/5000*bessely(0,49/2000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2))*(besselj(0,411/5000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2))-5000/411/(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2)*besselj(1,411/5000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2)))/(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2)*kxB*besselj(1,49/2000*(961261823162635/70368744177664-kxB^2)^(1/2))-49/2000*bessely(0,49/2000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2))*besselj(1,411/5000*(1925653029807063/140737488355328-803108098859253/36028797018963968*i-kxB^2)^(1/2))*(besselj(0,49/2000*(961261823162635/70368744177664-kxB^2)^(1/2))-2000/49/(961261823162635/70368744177664-kxB^2)^(1/2)*besselj(1,49/2000*(961261823162635/70368744177664-kxB^2)^(1/2)))/(961261823162635/70368744177664-kxB^2)^(1/2)*kxB

但是没能清楚之间的不同
 楼主| 发表于 2010-3-6 06:44 | 显示全部楼层
但我的结果虚数单位为什么始终是I,而不是小i,我并没有定义大I
发表于 2010-3-6 10:42 | 显示全部楼层
刚再试下, 家中版本是2009a, 的确是I!
不清楚新旧版本之间的不同及差异:@L , 同待高人路过!

[ 本帖最后由 ChaChing 于 2010-3-6 10:49 编辑 ]
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-11-16 18:46 , Processed in 0.054765 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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