| 5 | 1/1 | 返回列表 |
| 查看: 1842 | 回復(fù): 12 | ||||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||||
[求助]
多元函數(shù)求最值
|
||||
|
剛接觸matlab,我想用matlab求下面函數(shù)的最大、最小值以及取最值的時(shí)候自變量取值,是一個(gè)有4個(gè)自變量的函數(shù),自變量都有一定的變化范圍。具體函數(shù)是: f=[d*(s+b+d)+0.858*r*r-0.858*(r+d/2)*(r+d/2)]/[s*b-0.858*r*r];其中,2.79≤s≤2.83;7.97≤b≤8.07;0.13≤d≤0.18;0.6≤r≤1.有木有大神幫幫忙知道一下啊 |
| 百度你會(huì)不?http://www.google.com.hk/#hl=zh- ... rgbld.&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=b7e86341b10bb823&biw=1366&bih=667 |
榮譽(yù)版主 (著名寫手)
![]() |
專家經(jīng)驗(yàn): +4 |
|
>> f=@(x)(x(3).*(x(1)+x(2)+x(3))+0.858*x(4).*x(4)-0.858*(x(4)+x(3)/2).*(x(4)+x(3)/2))./(x(1).*x(2)-0.858*x(4).*x(4)); opt=optimset('Algorithm','interior-point'); [X,FVAL,EXITFLAG]= fmincon(f,[2.8 8 0.15 0.8],[],[],[],[],[2.79 7.97 0.13 0.6],[2.83 8.07 0.18 1],[],opt) Local minimum found that satisfies the constraints. Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance. X = 2.8300 8.0700 0.1300 0.9998 FVAL = 0.0600 EXITFLAG = 1 >> f1=@(x)-(x(3).*(x(1)+x(2)+x(3))+0.858*x(4).*x(4)-0.858*(x(4)+x(3)/2).*(x(4)+x(3)/2))./(x(1).*x(2)-0.858*x(4).*x(4)); >> [X,FVAL,EXITFLAG]= fmincon(f1,[2.8 8 0.15 0.8],[],[],[],[],[2.79 7.97 0.13 0.6],[2.83 8.07 0.18 1],[],opt) Local minimum found that satisfies the constraints. Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance, and constraints were satisfied to within the default value of the constraint tolerance. X = 2.7900 7.9700 0.1800 0.6000 FVAL = -0.0853 EXITFLAG = 1 |

木蟲 (著名寫手)
云中仙
樓上正解![]() 給你貼個(gè)1stOpt的 Parameters s[2.79,2.83], b[7.97,8.07],d[0.13,0.18],r[0.6,1]; Minimum =f; Function f=(d*(s+b+d)+0.858*r*r-0.858*(r+d/2)*(r+d/2))/(s*b-0.858*r*r); ====== 結(jié)果 ====== 迭代數(shù): 18 計(jì)算用時(shí)(時(shí):分:秒:毫秒): 00:00:00:94 計(jì)算中止原因: 達(dá)到收斂判定標(biāo)準(zhǔn) 優(yōu)化算法: 共扼梯度法 + 通用全局優(yōu)化法 函數(shù)表達(dá)式: (d*(s+b+d)+0.858*r*r-0.858*(r+d/2)*(r+d/2))/(s*b-0.858*r*r) 目標(biāo)函數(shù)值(最小): 0 s: 2.82999999999992 b: 8.06833196340274 d: 0 r: 0.830131999171392 ====== 計(jì)算結(jié)束 ====== |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 279分求調(diào)劑 一志愿211 +17 | chaojifeixia 2026-03-19 | 19/950 |
|
|---|---|---|---|---|
|
[考研] 材料292調(diào)劑 +4 | 橘頌思美人 2026-03-23 | 4/200 |
|
|
[考研] 一志愿武理材料工程348求調(diào)劑 +6 |  ̄^ ̄゜汗 2026-03-19 | 9/450 |
|
|
[考研] 333求調(diào)劑 +6 | 87639 2026-03-21 | 10/500 |
|
|
[考研] 求調(diào)劑一志愿海大,0703化學(xué)學(xué)碩304分,有大創(chuàng)項(xiàng)目,四級(jí)已過 +6 | 幸運(yùn)哩哩 2026-03-22 | 10/500 |
|
|
[考博] 招收博士1-2人 +3 | QGZDSYS 2026-03-18 | 4/200 |
|
|
[考研] 307求調(diào)劑 +3 | 余意卿 2026-03-18 | 3/150 |
|
|
[考研] 299求調(diào)劑 +5 | shxchem 2026-03-20 | 7/350 |
|
|
[考研] 一志愿重慶大學(xué)085700資源與環(huán)境總分308求調(diào)劑 +7 | 墨墨漠 2026-03-20 | 7/350 |
|
|
[考研] 22 350 本科985求調(diào)劑,求老登收留 +3 | 李軼男003 2026-03-20 | 3/150 |
|
|
[考研] 二本跨考鄭大材料306英一數(shù)二 +3 | z1z2z3879 2026-03-17 | 3/150 |
|
|
[考研] 一志愿武漢理工材料工程專碩調(diào)劑 +9 | Doleres 2026-03-19 | 9/450 |
|
|
[考研] 317求調(diào)劑 +5 | 申子申申 2026-03-19 | 9/450 |
|
|
[考研] 一志愿西南交通 專碩 材料355 本科雙非 求調(diào)劑 +5 | 西南交通專材355 2026-03-19 | 5/250 |
|
|
[考研] 材料學(xué)求調(diào)劑 +4 | Stella_Yao 2026-03-20 | 4/200 |
|
|
[考研] 一志愿 南京航空航天大學(xué)大學(xué) ,080500材料科學(xué)與工程學(xué)碩 +5 | @taotao 2026-03-20 | 5/250 |
|
|
[考研] 353求調(diào)劑 +3 | 拉鉤不許變 2026-03-20 | 3/150 |
|
|
[考研] 一志愿吉林大學(xué)材料學(xué)碩321求調(diào)劑 +11 | Ymlll 2026-03-18 | 15/750 |
|
|
[論文投稿]
申請回稿延期一個(gè)月,編輯同意了。但系統(tǒng)上的時(shí)間沒變,給編輯又寫郵件了,沒回復(fù)
10+3
|
wangf9518 2026-03-17 | 4/200 |
|
|
[考研] 本科鄭州大學(xué)物理學(xué)院,一志愿華科070200學(xué)碩,346求調(diào)劑 +4 | 我不是一根蔥 2026-03-18 | 4/200 |
|