Determines a zero of a 1D function in a given interval. The function has to be continuous and has to have different signs at the end points of the interval. You must manually select the polymorphic instance to use.


icon

Inputs/Outputs

  • cdbl.png accuracy

    accuracy controls the accuracy of the zero determination. The default is 1.00E-8.

  • cdbl.png start

    start is the leftmost point of the interval. The default is 0.0.

  • cdbl.png end

    end is the rightmost point of the interval. The default is 0.0.

  • csvrn.png f(x)

    f(x) is a strictly typed reference to the VI that implements the 1D function.

    Create this VI by starting from the VI template located in labview\vi.lib\gmath\zero.llb\Zero Finder f(x) 1D.vit.

  • cfxdt.png data

    data contains arbitrary values that pass to the VI that implements the function.

  • idbl.png zero

    zero is the determined zero of f(x). zero is a good approximation for only the exact value.

  • idbl.png f(zero)

    f(zero) is the function value at the point given by zero. The answer should be very close to zero.

  • iu32.png ticks

    ticks is the time effort for the whole calculation of the function values in milliseconds.

  • ii32.png error

    error returns any error or warning from the VI. When start > end, the application interprets it as an error condition. The function values at the points start and end must have different signs to guarantee the existence of a zero in (start,end). You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • Given the function f(x) with f(a)*f(b) < 0, Ridders' method determines c = (a + b)/2 and calculates the new guess using the following equation:

    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 |ab| < accuracy.

    Ridders' method is very fast and reliable.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Mathematics\Scripts and Formulas\Street Illumination Problem.vi