找回密码
 欢迎注册
查看: 22969|回复: 6

[求助] 初学Matlab解方程组报错

[复制链接]
发表于 2019-3-18 22:25:46 | 显示全部楼层 |阅读模式

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

您需要 登录 才可以下载或查看,没有账号?欢迎注册

×
用网上解方程组的例子,直接输入方程报错,用变量反而能出结果

>> [u,k]=solve('4+1/(k-u)^2-9/(4-k)^2-1=0','((17^2+u^2)-u^2)*(k-u)^2-u^2=0','u','k')
错误使用 solve>getEqns (line 418)
List of equations must not be empty.

出错 solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});

>> syms k u
nw=2;
ng=1;
d=17;
x1=4;
z1=3;
h=1;
[k,u]=solve(nw^2/(ng^2)+h^2/ng^2*(k-u)^2-(z1^2/(x1-k)^2)-1,(ng^2*(d^2+u^2)-u^2)*(k-u)^2-(h*u)^2)

k =

(18*root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 1))/17
(18*root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 2))/17
(18*root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 3))/17
(18*root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 4))/17
(16*root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 1))/17
(16*root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 2))/17
(16*root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 3))/17
(16*root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 4))/17


u =

root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 1)
root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 2)
root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 3)
root(z^4 - (68*z^3)/9 + (71383*z^2)/81 - (19652*z)/3 + 1085773/108, z, 4)
root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 1)
root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 2)
root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 3)
root(z^4 - (17*z^3)/2 + (14161*z^2)/16 - (14739*z)/2 + 3257319/256, z, 4)
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2019-3-18 22:37:45 | 显示全部楼层
很久很久没用MATLAB了,能提供下载链接么,最好是最新版本的,Linux的,
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2019-3-18 22:44:00 | 显示全部楼层
15个G,我下了16个小时
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2019-3-18 22:46:28 | 显示全部楼层
链接: https://pan.baidu.com/s/1idgVVisquz0TPMTFid33nw 提取码: pz74 windows32+64,Matlab2018a

点评

用https://github.com/iikira/BaiduPCS-Go 下载,下载速度直接爆表,我现在下载速度是11M/S. 已经下载了2G的内容了。  发表于 2019-3-18 23:01
谢谢,我刚找到了R2018b的,https://pan.baidu.com/s/18HFyLqbF3mFuLhvPz0W0SQ#list/path=%2F  发表于 2019-3-18 22:53
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2020-2-16 19:22:45 | 显示全部楼层
k=vpa(k) 可以得到数值解
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-11-21 21:06 , Processed in 0.025093 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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