DigComT

zero

DirectoryDOS NameType
Numeric zero m-function

Purpose

Zero finds the zero crossing of the monotonically increasing function

Calling Sequence

x = zero(f, xlower, xupper) or [x, count] = zero(f, xlower, xupper, N, b, a, farg, show)

INPUTS

Input Description
1 f
the function (a string)
2 xlower
the lower limit on x
3 xupper
the upper limit on x

Optional INPUTS

Input Description Default Value
4 N
precision control
10
5 b
offset constant
0
6 a
scaling constant
+1
7 farg
an argument for the function
[] (which means none)
8 show
plot steps (a string)
'no'

OUTPUTS

Output Description
1 x
the input to the function that is the zero
2 count
the number of times the function is evaluated

Description

Zero finds the zero crossing of the monotonically increasing function:
    a*(f(x) - b)
in the interval [xlower, xupper].

Notes

delta = (yupper-ylower)/N determines the precision

Example


x = -1:.01:1.5; plot(x, tan(x), 'g')
hold
% Current plot held
[x0, count] = zero('tan', min(x), max(x), 10000, 0, 1, [], 'yes')
%x0 =
%    0.0015
%count =
%     7
grid
hold
DigComT Manual Table of Contents DigComT Manual Native Intelligence Home

DigComT Licensee: Chris Heegard 
Native Intelligence
Last modified: Tuesday, January 11, 2000
Date created: Tuesday, January 11, 2000

Copyright © 1997-2000, Native Intelligence, All rights reserved.