drawManifolds {phaseR}R Documentation

Stable and unstable manifolds

Description

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.

Usage

drawManifolds(
  deriv,
  y0 = NULL,
  parameters = NULL,
  tstep = 0.1,
  tend = 100,
  col = c("green", "red"),
  add.legend = TRUE,
  state.names = c("x", "y"),
  method = "lsoda",
  ...
)

Arguments

deriv

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.

y0

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

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.

tstep

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.

tend

The final time of the numerical integration performed to identify the manifolds.

col

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").

add.legend

Logical. If TRUE, a legend is added to the plots. Defaults to TRUE.

state.names

The state names for ode functions that do not use positional states.

method

Passed to ode. See there for further details. Defaults to "lsoda".

...

Additional arguments to be passed to plot.

Value

Returns a list with the following components:

add.legend

As per input.

col

As per input, but with possible editing if a character vector of the wrong length was supplied.

deriv

As per input.

method

As per input.

parameters

As per input.

stable.1

A numeric matrix whose columns are the numerically computed values of the dependent variables for part of the stable manifold.

stable.2

A numeric matrix whose columns are the numerically computed values of the dependent variables for part of the stable manifold.

tend

As per input.

unstable.1

A numeric matrix whose columns are the numerically computed values of the dependent variables for part of the unstable manifold.

unstable.2

A numeric matrix whose columns are the numerically computed values of the dependent variables for part of the unstable manifold.

y0

As per input.

ystar

Location of the identified equilibrium point.

Author(s)

Michael J Grayling, Stephen P Ellner, John M Guckenheimer


[Package phaseR version 2.2.1 Index]