| 查看: 1637 | 回复: 12 | ||||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||||
[求助]
多元函数求最值
|
||||
|
刚接触matlab,我想用matlab求下面函数的最大、最小值以及取最值的时候自变量取值,是一个有4个自变量的函数,自变量都有一定的变化范围。具体函数是: 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.有木有大神帮帮忙知道一下啊 ![]() |
» 猜你喜欢
请问有评职称,把科研教学业绩算分排序的高校吗
已经有6人回复
2025冷门绝学什么时候出结果
已经有6人回复
Bioresource Technology期刊,第一次返修的时候被退回好几次了
已经有7人回复
真诚求助:手里的省社科项目结项要求主持人一篇中文核心,有什么渠道能发核心吗
已经有8人回复
寻求一种能扛住强氧化性腐蚀性的容器密封件
已经有5人回复
请问哪里可以有青B申请的本子可以借鉴一下。
已经有4人回复
请问下大家为什么这个铃木偶联几乎不反应呢
已经有5人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有4人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
AI论文写作工具:是科研加速器还是学术作弊器?
已经有3人回复
ldoop
铁杆木虫 (著名写手)
- 应助: 7 (幼儿园)
- 金币: 3485.8
- 散金: 3151
- 红花: 16
- 沙发: 1
- 帖子: 2225
- 在线: 285.5小时
- 虫号: 533053
- 注册: 2008-03-25
- 专业: 群落生态学
【答案】应助回帖
★ ★
感谢参与,应助指数 +1
iwill1k: 金币+2, ★★★很有帮助 2012-04-14 11:01:22
感谢参与,应助指数 +1
iwill1k: 金币+2, ★★★很有帮助 2012-04-14 11:01:22
|
用mathematica 计算了下 结果 NMinimize[{(d (s + b + d) + 0.858 r^2 - 0.858 (r + d/2)^2)/( s b - 0.858 r^2), 2.79 <= s <= 2.83, 7.97 <= b <= 8.07, 0.13 <= d <= 0.18, 0.6 <= r <= 1}, {s, b, d, r}] {0.0599968, {s -> 2.83, b -> 8.07, d -> 0.13, r -> 1.}} 最大值 NMaximize[{(d (s + b + d) + 0.858 r^2 - 0.858 (r + d/2)^2)/( s b - 0.858 r^2), 2.79 <= s <= 2.83, 7.97 <= b <= 8.07, 0.13 <= d <= 0.18, 0.6 <= r <= 1}, {s, b, d, r}] {0.0852625, {s -> 2.79, b -> 7.97, d -> 0.18, r -> 0.6}} |
11楼2012-04-12 00:24:35
【答案】应助回帖
感谢参与,应助指数 +1
| 百度你会不?http://www.google.com.hk/#hl=zh- ... rgbld.&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=b7e86341b10bb823&biw=1366&bih=667 |
2楼2012-04-09 11:43:42
dbb627
荣誉版主 (著名写手)
-

专家经验: +4 - 程序强帖: 2
- 应助: 289 (大学生)
- 贵宾: 0.589
- 金币: 24640.4
- 散金: 551
- 红花: 61
- 沙发: 1
- 帖子: 1246
- 在线: 1794.8小时
- 虫号: 149791
- 注册: 2005-12-29
- 性别: GG
- 专业: 污染控制化学
- 管辖: 计算模拟
【答案】应助回帖
感谢参与,应助指数 +1
|
>> 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 |

3楼2012-04-09 12:35:37
yqx1985
木虫 (著名写手)
云中仙
- 应助: 34 (小学生)
- 贵宾: 0.032
- 金币: 1608.8
- 散金: 1180
- 红花: 33
- 帖子: 1544
- 在线: 620.3小时
- 虫号: 550008
- 注册: 2008-04-22
- 性别: GG
- 专业: 药物设计与药物信息
楼上正解![]() 给你贴个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); ====== 结果 ====== 迭代数: 18 计算用时(时:分:秒:毫秒): 00:00:00:94 计算中止原因: 达到收敛判定标准 优化算法: 共扼梯度法 + 通用全局优化法 函数表达式: (d*(s+b+d)+0.858*r*r-0.858*(r+d/2)*(r+d/2))/(s*b-0.858*r*r) 目标函数值(最小): 0 s: 2.82999999999992 b: 8.06833196340274 d: 0 r: 0.830131999171392 ====== 计算结束 ====== |

4楼2012-04-09 13:43:37














回复此楼
