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

fmin_nonlincon (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_nonlincon(fun, x0, aineq, bineq)

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

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

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

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

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

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

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

Legacy Name: fmincon

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.

Examples

Inputs

Name Description
fun Specifies the name of the function, defined and saved in a .m file, whose minimum you want to compute. For non-smooth functions, the fmin_nonlincon 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 nonlinear, 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.

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

Related Topics

fmin_bracket
fmin_nonlin
fmin_pattern


 

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