fminbnd
求固定区间上单变量函数的最小值
语法
描述
fminbnd
是为指定的问题找到最小值的一维最小化器吗
x,x1,x2是有限标量吗f(x)是一个返回标量的函数。
返回一个值x
= fminbnd (<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-fun" class="intrnllnk">有趣的
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x1" class="intrnllnk">x1
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x2" class="intrnllnk">x2
)x
中所描述的标量值函数的局部最小值有趣的
在这段时间X1 < x < x2
.
中指定的优化选项使之最小化x
= fminbnd (<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-fun" class="intrnllnk">有趣的
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x1" class="intrnllnk">x1
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x2" class="intrnllnk">x2
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-options" class="intrnllnk">选项
)选项
.使用optimset
设置这些选项。
求最小值x
= fminbnd (<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-problem" class="intrnllnk">问题
)问题
中描述的结构<一个href="//www.tatmou.com/ch/ch/ch/help/optim/ug/fminbnd.html" class="intrnllnk">问题
.
[<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x" class="intrnllnk">
,对于任何输入参数,返回中计算的目标函数值x
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo_sep_shared-fval" class="intrnllnk">fval
= fminbnd(___)有趣的
在解决方案中x
.
[<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x" class="intrnllnk">
另外返回一个值x
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo_sep_shared-fval" class="intrnllnk">fval
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-exitflag" class="intrnllnk">exitflag
= fminbnd(___)exitflag
描述退出条件。
[<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-x" class="intrnllnk">
另外返回一个结构x
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo_sep_shared-fval" class="intrnllnk">fval
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-exitflag" class="intrnllnk">exitflag
,<一个href="//www.tatmou.com/ch/ch/help/optim/ug/#bu_pfzo-output" class="intrnllnk">输出
= fminbnd(___)输出
包含关于优化的信息。
例子
输入参数
输出参数
限制
要最小化的函数必须是连续的。
fminbnd
可能只会给出局部的解决方案。金宝搏官方网站fminbnd
当解在区间的边界上时可以表现出缓慢的收敛。在这种情况下,<一个href="//www.tatmou.com/ch/ch/ch/help/optim/ug/fmincon.html">fmincon
通常会给出更快更准确的答案。金宝搏官方网站
算法
fminbnd
是函数文件。该算法基于黄金分割搜索和抛物线插值。除非左端点x1非常接近正确的端点x2,fminbnd
没有评估有趣的
在端点处,所以有趣的
只需要定义为x在这段时间x1<x<x2.
如果最小值实际发生在x1或x2,fminbnd
返回一个点x
在间隔的内部(x1,x2),接近最小值。在这种情况下,的距离x
离最小值不大于2*(TolX + 3*abs(x)*根号(eps))
.看到<一个href="//www.tatmou.com/ch/ch/ch/help/optim/ug/fminbnd.html" class="intrnllnk">[1]一个>或<一个href="//www.tatmou.com/ch/ch/ch/help/optim/ug/fminbnd.html" class="intrnllnk">[2]一个>查看算法的详细信息。
选择功能
应用程序
的优化一个>活动编辑器任务提供了一个可视化界面fminbnd
.
参考文献
[1]福赛、g.e.、m.a.马尔科姆和c.b.莫勒。计算机数学计算方法“,.恩格尔伍德悬崖,新泽西州:普伦蒂斯大厅,1976年。
布伦特,理查德。P。无导数极小化算法.恩格尔伍德悬崖,新泽西州:Prentice-Hall, 1973。
扩展功能
版本历史
R2006a之前介绍