Member of the optimization class.
xmin = fminbnd(fun, a, b)
[xmin, fval] = fminbnd(fun, a, b)
Computes the 1-dimensional minimum between two points of a function.
| Name | Description |
| fun | Specifies the function whose minimum you want to compute. The function you specify must accept and return a real, double-precision scalar. fun is a string. |
| a | Specifies the lower bound for the line segment on which to find the minimum. a is a real, double-precision scalar. |
| b | Specifies the upper bound for the line segment on which to find the minimum. b is a real, double-precision scalar. |
| Name | Description |
| xmin | Returns the point between a and b at which fun has the minimum value. xmin is a real, double-precision scalar. |
| fval | Returns the value of fun evaluated at xmin. fval is a real, double-precision scalar. |
This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.
XMIN = fminbnd('sin', 0, 2*pi);
% The myfun function is defined by:
% function f = myfun(x)
% f = 3*x^2-1.2*x+3
[XMIN, FVAL] = fminbnd('myfun', -10, 10);