fmin_pattern (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: optimization

Requires: MathScript RT Module

Syntax

xmin = fmin_pattern(fun, xstart)

[xmin, fval] = fmin_pattern(fun, xstart)

Legacy Name: fminsearch

Description

Uses the Downhill Simplex method to compute the n-dimensional minimum of a function. You often can use the Downhill Simplex method to minimize discontinuous functions.

Examples

Inputs

Name Description
fun Specifies the name of the function, defined and saved in a .m file, whose minimum you want to compute. The function you specify must accept a vector of the same length as xstart and return a scalar. fun is a string.
xstart Specifies the point at which to begin searching for a minimum value of fun. xstart is a real, double-precision vector.

Outputs

Name Description
xmin Returns the point at which fun has the minimum value. xmin is a real, double-precision vector.
fval Returns the value of fun evaluated at xmin. fval is a real, double-precision scalar.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine No
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

% The myfun function is defined by:
% function f = myfun(x)
% f = x(1)^2-5*x(1)+3*(x(2)+2)^2+2
[XMIN, FVAL] = fmin_pattern('myfun', [1; 1])

Related Topics

fmin_bracket
fmin_nonlin
fmin_nonlincon

文章是否对您有帮助?

没有帮助