Plots the stable and unstable manifolds of a saddle point. A search procedure is utilised to identify an equilibrium point, and if it is a saddle then its manifolds are added to the plot.
drawManifolds(deriv, y0 = NULL, parameters = NULL, tstep = 0.1,
tend = 100, col = c("green", "red"), add.legend = TRUE,
state.names = c("x", "y"), ...)
Returns a list
with the following components:
As per input.
As per input, but with possible editing if a
character
vector
of the wrong
length
was supplied.
As per input.
As per input.
A numeric
matrix
whose columns are the numerically computed values of the dependent variables
for part of the stable manifold.
A numeric
matrix
whose columns are the numerically computed values of the dependent variables
for part of the stable manifold.
As per input.
A numeric
matrix
whose columns are the numerically computed values of the dependent variables
for part of the unstable manifold.
A numeric
matrix
whose columns are the numerically computed values of the dependent variables
for part of the unstable manifold.
As per input.
Location of the identified equilibrium point.
A function computing the derivative at a point for the ODE
system to be analysed. Discussion of the required structure of these
functions can be found in the package vignette, or in the help file for the
function ode
.
The initial point from which a saddle will be searched for. This
can either be a numeric
vector
of
length
two, reflecting the location of the two
dependent variables, or alternatively this can be specified as
NULL
, and then locator
can be
used to specify the initial point on a plot. Defaults to
NULL
.
Parameters of the ODE system, to be passed to deriv
.
Supplied as a numeric
vector
; the
order of the parameters can be found from the deriv
file. Defaults to
NULL
.
The step length of the independent variable, used in numerical
integration. Decreasing the absolute magnitude of tstep
theoretically
makes the numerical integration more accurate, but increases computation
time. Defaults to 0.01
.
The final time of the numerical integration performed to identify the manifolds.
Sets the colours used for the stable and unstable manifolds.
Should be a character
vector
of
length
two. Will be reset accordingly if it is of the
wrong length
. Defaults to c("green", "red")
.
Logical. If TRUE
, a legend is added to the plots.
Defaults to TRUE
.
The state names for ode
functions
that do not use positional states.
Additional arguments to be passed to plot.
Michael J Grayling, Stephen P Ellner, John M Guckenheimer