Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

fmin_pattern (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

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


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit