24小时热门版块排行榜    

查看: 1068  |  回复: 9
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

logyquan

银虫 (小有名气)

[交流] 【求助】请问下面MATLAB程序哪儿不对呢 已有4人参与

我想求非线性方程组
df1=diff(F, x(1))=0
df2=diff(F, x(2))=0
以得到x(1),x(2)的解
用下面的程序,错在哪呢,谢谢高人指点

d1=560
d2=4500
p=40000
h1=12
h2=10
h0=3
s1=240
s2=600
sp=5500
s01=320
s02=1000
d0=d1+d2
syms x(1) x(2);
F=(sp+(s01+s1)* x(1)+(s02+s2)* x(2))*((( x(1)-1)*h0+h1)*d1/(x(1)*d0)+(( x(2)-1)*h0+h2)*d2/(x(2)*d0)-( x(1)-2)*d1*h0/(x(1)*p)-( x(2)-2)*d2*h0/(x(2)*p))
df1=diff(F, x(1))
df2=diff(F, x(2))
fun=inline('df1,df2', 'x');
x0=[1;1];
x=fsolve('fun',x0)
回复此楼

» 猜你喜欢

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

zzuwangshilei

木虫 (正式写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
adu886886(金币+1):辛苦了 2010-06-03 14:07:20
引用回帖:
Originally posted by flyinuniverse58 at 2010-06-03 05:55:30:
I think the problem is the misusing of 'syms'.
'Syms' doesn't support the variable parameter array.
You could try to change all the x(1), x(2) to x1, x2.

If you want to use variable parameter  ...

帮楼主翻一下:
我认为问题在于无法使用'syms'.
'syms'不支持变量参数矩阵.
你应当试着将X(1),x(2)改为X1,X2,看是否可行。

其他方法是,使用其他的软件1stopt.
4楼2010-06-03 09:52:03
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 10 个回答

flyinuniverse58

木虫 (正式写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
adu886886(金币+1):3k u 2010-06-03 14:07:37
I think the problem is the misusing of 'syms'.
'Syms' doesn't support the variable parameter array.
You could try to change all the x(1), x(2) to x1, x2.

If you want to use variable parameter as array, you can try another software, name is 1stopt.
2楼2010-06-03 05:55:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

flyinuniverse58

木虫 (正式写手)

zzuwangshilei:可以设置区域语言选项 2010-06-03 09:47:18
I am very sorry that my computer cannot input Chinese, because this is the office computer.
3楼2010-06-03 05:56:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

logyquan

银虫 (小有名气)

zzuwangshilei:鼓励讨论 2010-06-05 10:48:05
引用回帖:
Originally posted by flyinuniverse58 at 2010-06-03 05:55:30:
I think the problem is the misusing of 'syms'.
'Syms' doesn't support the variable parameter array.
You could try to change all the x(1), x(2) to x1, x2.

If you want to use variable parameter  ...

你好,谢谢,问题是在这里,但是fsolve命令里,fun函数中x要是向量的形式,不知道怎么处理

[ Last edited by logyquan on 2010-6-4 at 13:06 ]
5楼2010-06-04 13:05:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 化学工程321分求调剂 +9 大米饭! 2026-03-15 12/600 2026-03-16 21:59 by 大米饭!
[考研] 211本,11408一志愿中科院277分,曾在中科院自动化所实习 +3 Losir 2026-03-12 4/200 2026-03-16 21:52 by Losir
[基金申请] 国自科面上基金字体 +6 iwuli 2026-03-12 7/350 2026-03-16 21:18 by sculhf
[考研] 302求调剂 +3 小贾同学123 2026-03-15 5/250 2026-03-16 20:39 by zhq0425
[考研] 一志愿苏州大学材料工程(085601)专硕有科研经历三项国奖两个实用型专利一项省级立项 +3 大火山小火山 2026-03-16 5/250 2026-03-16 16:54 by barlinike
[考研] 0703化学336分求调剂 +3 zbzihdhd 2026-03-15 3/150 2026-03-16 16:44 by 我的船我的海
[考研] 318求调剂 +3 Yanyali 2026-03-15 3/150 2026-03-16 16:41 by houyaoxu
[考研] 283求调剂 +10 小楼。 2026-03-12 14/700 2026-03-16 16:08 by 13811244083
[考研] 22408总分284求调剂 +3 InAspic 2026-03-13 3/150 2026-03-15 11:10 by zhq0425
[考研] 中科大材料与化工319求调剂 +3 孟鑫材料 2026-03-14 3/150 2026-03-14 20:10 by ms629
[基金申请] 面上和青基一样限30页不合理 +5 wowsunflower 2026-03-10 7/350 2026-03-14 17:21 by kingkocxr
[考研] 一志愿湖师大化学289求调剂 +6 XMCMM3.14159 2026-03-10 6/300 2026-03-14 00:28 by JourneyLucky
[考研] 311求调剂 +5 牛乳糖的卡卡 2026-03-10 5/250 2026-03-14 00:05 by JourneyLucky
[考研] 311求调剂 +8 zchqwer 2026-03-10 8/400 2026-03-14 00:01 by JourneyLucky
[考研] 0856材料与化工301求调剂 +5 奕束光 2026-03-13 5/250 2026-03-13 22:00 by 星空星月
[考研] (081700)化学工程与技术-298分求调剂 +12 11啦啦啦 2026-03-11 35/1750 2026-03-13 21:25 by JourneyLucky
[考研] 329求调剂 +3 miaodesi 2026-03-12 4/200 2026-03-13 20:53 by 18595523086
[考研] 材料301分求调剂 +5 Liyouyumairs 2026-03-12 5/250 2026-03-13 14:42 by JourneyLucky
[考研] 收调剂 +7 调剂的考研学生 2026-03-10 7/350 2026-03-10 17:57 by 麦茶汤圆
[考研] 085602化工求调剂 +7 董boxing 2026-03-10 7/350 2026-03-10 17:07 by BruceLiu320
信息提示
请填处理意见