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

fmin_bracket (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_bracket(fun, a, b)

[xmin, fval] = fmin_bracket(fun, a, b)

Legacy Name: fminbnd

Description

Computes the 1-dimensional minimum between two points of a function.

Examples

Inputs

Name Description
fun Specifies the name of the function, defined and saved in a .m file, 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.

Outputs

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.

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

XMIN = fmin_bracket('sin', 0, 2*pi);

% The myfun function is defined by:
% function f = myfun(x)
% f = 3*x^2-1.2*x+3
[XMIN, FVAL] = fmin_bracket('myfun', -10, 10);

Related Topics

fmin_nonlin
fmin_nonlincon
fmin_pattern


 

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