Plots the stable and unstable manifolds of a saddle point. A search procedure is utilised to identify an equilibrium point, and if this is a saddle then the manifolds are added to the plot.
drawManifolds(deriv, y0 = NULL, parameters = NULL, tstep = 0.1,
tend = 1000, col = c("green", "red"), add.legend = TRUE,
state.names = c("x", "y"), ...)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 guide.
The initial point from which a saddle will be searched for. This can either be a vector of length two reflecting the location of the two dependent variables initially, or it can be left blank and the user can use locator to specify the initial point on a plot
Parameters of the ODE system, to be passed to deriv. Supplied as a 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. Will be reset accordingly if it is a vector of the wrong length. Defaults to c("green", "red").
Logical. If TRUE, a legend is added to the plots. Defaults to TRUE.
State names for ode functions that do not use positional states
Additional arguments to be passed to plot.
Returns a list with the following components (the exact make up is dependent upon the value of system):
As per input.
As per input, but with possible editing if a vector of the wrong length was supplied.
As per input.
As per input.
A matrix whose columns are the numerically computed values of the dependent variables for part of the stable manifold.
A matrix whose columns are the numerically computed values of the dependent variables for part of the stable manifold.
As per input.
A matrix whose columns are the numerically computed values of the dependent variables for part of the unstable manifold.
A 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.