24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 611  |  回复: 7
当前主题已经存档。
【有奖交流】积极回复本帖子,参与交流,就有机会分得作者 yatlan 的 4 个金币
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

yatlan

新虫 (初入文坛)

[交流] 【求助】matlab 求解方程组时 出错,非常急,好心人帮忙!

clear;
syms  a b c d e cl cz ll lz cll lll czl lzl;
a=ll*lz*cl*cz;
b=ll*cl+lz*cz+lz*cl;
c=ll*lz*cl;
d=lz;
e=(b+(b^2-4*a)^(1/2))/2;
cll=(a*(a-e^2))/(e*(a*d-c*e))-3.071;
lll=(a*d-c*e)/(a-e^2)-7.533;
czl=(a-e^2)/(c-d*e)-1.313;
lzl=(e*(c-d*e))/(a-e^2)-3.222;
solve(cll,lll,czl,lzl);

如上的程序在最后solve 求解时提示
??? Error using ==> subsref
Index exceeds matrix dimensions.

Error in ==> sym.subsref at 16
  y = builtin('subsref',struct(x),a);

Error in ==> solve at 191
      S.(char(symvars(j))) = R(:,j);

再线等................!  
非常感谢
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

buffalo7239

至尊木虫 (著名写手)

★ ★
sunxiao(金币+2,VIP+0):谢谢参与,欢迎常来 10-3 00:15
你的思想是干嘛,说清楚,解出来的结果,abcde跟你写的一样。如:
a =

ll*lz*cl*cz
4楼2009-10-02 08:26:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 8 个回答

bote

sorry for some confusiion?

★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
sunxiao(金币+2,VIP+0):thank you for your suggestions 10-3 00:13
1. seems using solve(cll,lll,czl,lzl, 'cz', 'cl', 'lz', 'll')

have tried a simple case like what you are going to do. it works.
the code is as follows:

clear;
clc;
syms a u v;
l=a*u^2 + v^2;
m=u-v-1;
n=a^2-5*a+6;
A=solve(l,m,n, 'a','u','v');

therefore, it seems that your equations are too complicated for the matlab. maybe, the other approaches had to be considered, such as simplify your equations first.
anyway, show it up here if you solve the problem. good luck.

again: if you remove only one denominator from any one of your four equations, the code can run through to the end after replacing the solve function with the one given above. so, you had to simplify your equations first.

[ Last edited by bote on 2009-10-2 at 12:27 ]
2楼2009-10-02 06:28:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

buffalo7239

至尊木虫 (著名写手)

★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
sunxiao(金币+2,VIP+0):谢谢参与,欢迎常来 10-3 00:13
我帮你运行了一下,我的MATLAB7.0没有出错,仅出现警告,可能你的版本过低。结果如下:
Warning: Explicit solution could not be found.
> In solve at 140
  In sym.solve at 49
  In Untitled at 12
3楼2009-10-02 08:23:25
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yatlan

新虫 (初入文坛)

1.其实这是一个电路的变换.[ll,lz,cl,cz] 是我最终要求出来的结果, a,b,c,d,e是中间变量 ,cll,lll,czl,lzl是已知的方程表达式,我利用matlab 将中间变量带入到最终方程中.即使 我没有加入中间变量,就是利用最终方程求解a,c,d,e,在我这里一样提示同样的错误.
2.我用的是matlab 2008b,难道这个版本有问题吗?
5楼2009-10-02 10:46:28
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 344材料与化工调剂 +8 调剂上岸玘 2026-04-03 8/400 2026-04-03 21:38 by Demonsssss
[考研] 336求调剂 +8 kiyy 2026-04-01 8/400 2026-04-03 19:41 by lijunpoly
[考研] 兽医调剂 +3 wh119216 2026-04-02 3/150 2026-04-03 19:34 by zrongyan
[考研] 332求调剂 +8 @MZB382400 2026-03-28 8/400 2026-04-03 19:31 by lijunpoly
[考研] 310求调剂 +18 争取九点睡 2026-03-30 18/900 2026-04-03 18:35 by ls刘帅
[考研] 265求调剂 +16 林深温澜 2026-04-01 19/950 2026-04-03 11:24 by zhangdingwa
[考研] 一志愿深大085601材料工程专业(专硕)300分可以调剂去哪 +8 10160315 2026-04-02 8/400 2026-04-03 09:36 by hypershenger
[考研] 求生物学调剂 +10 15172915737 2026-04-01 10/500 2026-04-02 18:53 by 哦哦嗯哈
[考研] 348求调剂 +11 zzzzyk123 2026-04-01 11/550 2026-04-02 16:52 by Wang200018
[考研] 一志愿郑大材料工程290求调剂 +20 Youth_ 2026-03-30 20/1000 2026-04-02 14:48 by 5896
[考研] 初试301,代码085701环境工程,本硕一致,四六级已过,有二区一作,共发表5篇论文 +6 axibli 2026-04-01 6/300 2026-04-02 13:42 by Ecowxq666!
[考研] 266求调剂 +4 学员97LZgn 2026-04-02 4/200 2026-04-02 09:52 by yulian1987
[考研] 材料求调剂 +8 呢呢妮妮 2026-04-01 8/400 2026-04-02 07:13 by yjolah
[考研] 0703求调剂 +4 zizimo 2026-03-31 4/200 2026-04-01 16:04 by yanflower7133
[考研] 材料专硕306英一数二 +7 z1z2z3879 2026-03-31 7/350 2026-04-01 14:50 by ZXlzxl0425
[考研] 一志愿武理材料工程302调剂环化或化工 +15 Doleres 2026-03-31 16/800 2026-04-01 09:49 by lfj11
[考研] 254材料与化工求调剂 +3 翰冬林楠 2026-03-30 4/200 2026-03-31 17:53 by yishunmin
[考研] 343求调剂 +8 爱羁绊 2026-03-28 8/400 2026-03-31 16:12 by 不吃魚的貓
[考研] 291求调剂 +5 Y-cap 2026-03-29 6/300 2026-03-29 13:18 by mumin1990
[考研] 086000生物与医药调剂 +5 Feisty。 2026-03-28 9/450 2026-03-29 12:02 by longlotian
信息提示
请填处理意见