24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 610  |  回复: 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

至尊木虫 (著名写手)

★ ★ ★
小木虫(金币+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的回帖
查看全部 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

至尊木虫 (著名写手)

★ ★
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的回帖

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的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 总分328生物与医药考数学求调剂 +6 aaadim 2026-04-02 8/400 2026-04-03 22:31 by aaadim
[考研] 344材料与化工调剂 +8 调剂上岸玘 2026-04-03 8/400 2026-04-03 21:38 by Demonsssss
[考研] 11408,335分,本科211,求调剂,可转专业 +3 鳄梨大鳄鱼 2026-04-03 3/150 2026-04-03 21:18 by zhq0425
[考研] 283分求调剂 +6 小聂爱学习 2026-04-03 6/300 2026-04-03 20:46 by zhq0425
[考研] 285求调剂 +5 AZMK 2026-04-03 8/400 2026-04-03 18:17 by AZMK
[考研] 372分材料与化工(085600)一志愿湖南大学求调剂 +3 蓝笺片 2026-04-03 4/200 2026-04-03 17:58 by Jimmyandyou
[考研] 材料与化工306分找调剂 +22 沧海轻舟e 2026-04-02 23/1150 2026-04-03 15:08 by hypershenger
[考研] 求调剂!生物与医药专硕 +4 逆转陆先生 2026-04-01 5/250 2026-04-03 08:33 by Jaylen.
[考研] 085600,320分求调剂 +6 大馋小子 2026-04-02 6/300 2026-04-02 21:54 by dongzh2009
[考研] 求调剂 302分初试 0854 +5 伶可乐 2026-04-02 5/250 2026-04-02 17:53 by 笔落锦州
[考研] 301求调剂 +4 细胞相关蛋白 2026-04-02 8/400 2026-04-02 16:30 by 271179835
[考研] 一志愿北京理工大学本科211材料工程294求调剂 +8 mikasa的围巾 2026-03-28 9/450 2026-04-02 12:09 by ms629
[考研] 0856初试324分求调剂 +6 想上学求调 2026-04-01 6/300 2026-04-02 11:42 by 星空星月
[考研] 354求调剂 +4 lxb598 2026-03-31 5/250 2026-04-02 09:55 by Jaylen.
[考研] 材料求调剂 +10 呢呢妮妮 2026-04-01 13/650 2026-04-02 09:17 by olim
[考研] 340求调剂 +4 希望如此i 2026-03-31 4/200 2026-03-31 16:40 by 690616278
[考研] 274求调剂 +6 xiao爱同学 2026-03-30 6/300 2026-03-31 10:04 by cal0306
[考研] 一志愿大连理工大学材料求调剂 +6 Gymno 2026-03-30 6/300 2026-03-31 07:26 by 无际的草原
[考研] 一志愿双一流机械285分求调剂 +4 幸运的三木 2026-03-29 5/250 2026-03-29 14:49 by Miko19
[考研] 11408软件工程求调剂 +3 Qiu学ing 2026-03-28 3/150 2026-03-28 21:50 by zhq0425
信息提示
请填处理意见