zero
| Directory | DOS Name | Type |
| 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 |
|
f
|
the function (a string)
|
|
xlower
|
the lower limit on x
|
|
xupper
|
the upper limit on x
|
Optional INPUTS
|
Input |
Description |
Default Value |
|
N
|
precision control
|
10
|
|
b
|
offset constant
|
0
|
|
a
|
scaling constant
|
+1
|
|
farg
|
an argument for the function
|
[] (which means none)
|
|
show
|
plot steps (a string)
|
'no'
|
OUTPUTS
|
Output |
Description |
|
x
|
the input to the function that is the zero
|
|
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 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.