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

fmincon (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 = fmincon(fun, x0, aineq, bineq)

xmin = fmincon(fun, x0, aineq, bineq, aeq, beq)

xmin = fmincon(fun, x0, aineq, bineq, aeq, beq, min, max)

xmin = fmincon(fun, x0, aineq, bineq, aeq, beq, min, max, nonlinearfun)

[xmin, fval] = fmincon(fun, x0, aineq, bineq)

[xmin, fval] = fmincon(fun, x0, aineq, bineq, aeq, beq)

[xmin, fval] = fmincon(fun, x0, aineq, bineq, aeq, beq, min, max)

[xmin, fval] = fmincon(fun, x0, aineq, bineq, aeq, beq, min, max, nonlinearfun)

[xmin, fval, lambda] = fmincon(fun, x0, aineq, bineq)

[xmin, fval, lambda] = fmincon(fun, x0, aineq, bineq, aeq, beq)

[xmin, fval, lambda] = fmincon(fun, x0, aineq, bineq, aeq, beq, min, max)

[xmin, fval, lambda] = fmincon(fun, x0, aineq, bineq, aeq, beq, min, max, nonlinearfun)

Description

Uses the sequential quadratic programming method to compute the minimum of a function. LabVIEW constrains the computation based on the inputs that you specify.

Details

Examples

Inputs

Name Description
fun Specifies the function whose minimum you want to compute. For non-smooth functions, the fmincon function might not generate the optimal value. fun is a string.
x0 Specifies the point at which to begin searching for a minimum value of fun. x0 is a real, double-precision vector.
aineq Specifies a matrix for the linear inequality constraints according to the following equation: aineq*xmin <= bineq. aineq can be []. aineq is a real, double-precision matrix.
bineq Specifies a vector for the linear inequality constraints according to the following equation: aineq*xmin <= bineq. bineq must be [] when aineq is []. bineq is a real, double-precision vector.
aeq Specifies a matrix for the linear equality constraints according to the following equation: aeq*xmin = beq. aeq can be []. aeq is a real, double-precision matrix.
beq Specifies a vector for the linear equality constraints according to the following equation: aeq*xmin = beq. beq must be [] when aeq is []. beq is a real, double-precision vector.
min Specifies the lower bound for the solution vector according to the following equation: min <= x <= max. min can be []. min is a real, double-precision vector.
max Specifies the upper bound for the solution vector according to the following equation: min <= x <= max. max can be []. max is a real, double-precision vector.
nonlinearfun Specifies a function that provides additional, usually non-linear, constraints. The function you specify must accept a vector and return two vectors, nonlinineq and nonlineq. LabVIEW finds a solution such that nonlinineq <= 0 and nonlineq = 0. nonlinearfun is a string.

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.
lambda Returns the lambda values for the solution vector. lambda is a real, double-precision vector.

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-x(2)^2;
[XMIN, FVAL] = fmincon('myfun', [0; 0], [], [], [0 1], [0])

Related Topics

fminbnd
fminsearch
fminunc


Resources


 

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