# Find All Minima 1D (Brent with Derivatives) (G Dataflow)

Determines all local minima of a function in an interval based on derivatives of the function.

## formula

Function under investigation. The formula can contain any number of valid variables.

Entering Valid Variables

This node accepts variables that use the following format rule: variables must start with a letter or an underscore followed by any number of alphanumeric characters or underscores.

## start

Start point of the interval.

Default: 0

## end

End value of the interval where this node stops calculating values.

Default: 1

## step type

Spacing used for the function values.

Name Value Description
Fixed Function 0 Uses uniformly spaced function values.
Modified Function 1 Uses optimal step size. In general, Modified Function leads to more accurate minima.

Default: Fixed Function

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## accuracy

Accuracy of the minimum of the formula.

The node stops running if the difference between two consecutive approximations equals to or is less than the value of accuracy.

Default: 1E-08

## minima

All minima of the formula in the interval (start, end).

## f(minima)

Function values at the points minima.

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Finding the Maxima of a Function

To find the maxima of a function, you must take -function as the input. The -f(minima) are the correct maximal function values.

This node finds all minima in the given interval (start, end). To find all minima 1D of f(x) = cos(x2) in interval (-1.0, 6.0), enter the following values on the panel:

 start -1.0 end 6.0 formula cos(x^2)

The following illustration shows the plot of f(x). The red points on the plot are the locations of the minima.

Note

If the start or end values are close to the minimum value, set step type to Modified Function.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices