Member of the optimization class.
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)
Uses the sequential quadratic programming method to compute the minimum of a function. LabVIEW constrains the computation based on the inputs that you specify.
| 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. |
| 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. |
This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.
% 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])