Table Of Contents

Find a Zero 1D (Ridders » VI) (G Dataflow)

Version:
    Last Modified: August 28, 2017

    Determines a zero of a function in a given interval using the Ridders' method. You define the function with a strictly typed VI reference.

    connector_pane_image
    datatype_icon

    data

    Arbitrary values passed to the strictly typed VI reference.

    datatype_icon

    f(x)

    Strictly typed reference to the VI that implements the function.

    The function must be continuous and must have different signs at start and end.

    datatype_icon

    start

    Start value of the interval.

    Default: 0

    datatype_icon

    end

    End value of the interval.

    Default: 1

    datatype_icon

    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

    datatype_icon

    options

    Conditions that terminate the process of finding zeros.

    This node terminates the process of finding zeros if this node reaches the accuracy threshold or passes the maximum iterations threshold.

    datatype_icon

    accuracy

    Maximum deviation of the calculated solution from the actual solution when determining the zeros.

    Default: 1E-08

    datatype_icon

    maximum iterations

    Maximum number of iterations that the node runs to determine the zeros.

    Default: 200

    datatype_icon

    zero

    Determined value of the independent variable where the function evaluates to zero.

    This value is an approximation of the actual value of the variable where the function evaluates to zero.

    datatype_icon

    f(zero)

    Function value at zero. The value is expected to be nearly zero.

    datatype_icon

    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.

    Algorithm for Determining Zeros Using the Ridders' Method

    Given the function f(x) with f(a) * f(b) < 0, Ridders' method calculates cnew using the following equation:

    c new = c + ( c a ) sign ( f ( a ) f ( b ) ) f ( c ) f ( c ) 2 f ( a ) f ( b )

    where

    • cnew is the new guess to be used in the new iteration
    • a and b are given values of the variable that satisfy f(a) * f(b) < 0
    • c = a + b 2

    The values start, cnew, and end are the base for the new iteration, depending on which of the following inequalities is true:

    f(start) * f(cnew) < 0

    f(cnew) * f(end) < 0

    The algorithm stops if |a - b| < accuracy.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices

    Web Server: Not supported in VIs that run in a web application


    Recently Viewed Topics