MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB数学相关] matlab7.0求函数最小值 (https://www.labfans.com/bbs/showthread.php?t=11093)

fange87 2010-03-24 20:11

matlab7.0求函数最小值
 
函数f(x)=x^2+a*x+b,当a=2,b=3时,当a=3,b=5时,求函数在0<x<5 时的最小值,请高手给出全部命令,谢谢!用的是matlab7.0的版本,

anbcjys 2010-03-25 09:33

回复: matlab7.0求函数最小值
 
一种是遍历法 不过对于精度较高的 所需时间就长
另外可以采用求导 找极点法 然后比较极点

zsy312 2010-03-28 11:08

回复: matlab7.0求函数最小值
 
f=@(x) x.^2+2*x+3
[x,y]=fminbnd(f,0,5)%x自变量,y函数值

f=@(x) x.^2+3*x+5
[x,y]=fminbnd(f,0,5)
结果显然是有误差的,想进行没误差的符号运算,用maple。

mathjiang 2010-03-28 19:40

回复: matlab7.0求函数最小值
 
二次函数极值问题也要用matlab做吗?

zsy312 2010-04-03 10:49

回复: matlab7.0求函数最小值
 
[QUOTE=mathjiang;35551]二次函数极值问题也要用matlab做吗?[/QUOTE]

我看也是无聊。:):)


所有时间均为北京时间。现在的时间是 14:44

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.