Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

fminsearch (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the optimization class.

Syntax

xmin = fminsearch(fun, xstart)

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

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.

Details

Examples

Inputs

Name Description
fun Specifies the function 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

This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.

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] = fminsearch('myfun', [1; 1])

Related Topics

fminbnd
fmincon
fminunc


Resources


 

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