View source: R/phasePlaneAnalysis.R
phasePlaneAnalysis | R Documentation |
Allows the user to perform a basic phase plane analysis and produce a simple plot without the need to use the other functions directly. Specifically, a range of options are provided and the user inputs a value to the console to decide what is added to the plot.
phasePlaneAnalysis( deriv, xlim, ylim, tend = 100, parameters = NULL, system = "two.dim", add = FALSE, state.names = if (system == "two.dim") c("x", "y") else "y" )
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 |
xlim |
In the case of a two-dimensional system, this sets the limits of
the first dependent variable in any subsequent plot. In the case of a
one-dimensional system, this sets the limits of the independent variable.
Should be a |
ylim |
In the case of a two-dimensional system this sets the limits of
the second dependent variable in any subsequent plot. In the case of a
one-dimensional system, this sets the limits of the dependent variable.
Should be a |
tend |
The value of the independent variable to end any subsequent numerical integrations at. |
parameters |
Parameters of the ODE system, to be passed to |
system |
Set to either |
add |
Logical. If |
state.names |
The state names for |
The user designates the derivative file and other arguments as per the above. Then the following ten options are available for execution:
1. Flow field: Plots the flow field of the system. See
flowField
.
2. Nullclines: Plots the nullclines of the system. See
nullclines
.
3. Find fixed point (click on plot): Searches for an equilibrium point
of the system, taking the starting point of the search as where the user
clicks on the plot. See findEquilibrium
.
4. Start forward trajectory (click on plot): Plots a trajectory, i.e.,
a solution, forward in time with the starting point taken as where the user
clicks on the plot. See trajectory
.
5. Start backward trajectory (click on plot): Plots a trajectory,
i.e., a solution, backward in time with the starting point taken as where the
user clicks on the plot. See trajectory
.
6. Extend Current trajectory (a trajectory must already be plotted):
Extends already plotted trajectories further on in time. See
trajectory
.
7. Local stable/unstable manifolds of a saddle (two-dimensional
systems only) (click on plot): Plots the stable and unstable manifolds of a
saddle point. The user clicks on the plot and an equilibrium point is
identified see (3) above, if this point is a saddle then the manifolds are
plotted. See drawManifolds
.
8. Grid of trajectories: Plots a set of trajectories, with the starting
points defined on an equally spaced grid over the designated plotting range
for the dependent variable(s). See trajectory
.
9. Exit: Exits the current call to phasePlaneAnalysis().
10. Save plot as PDF: Saves the produced plot as "phasePlaneAnalysis.pdf" in the current working directory.
Michael J Grayling, Stephen P Ellner, John M Guckenheimer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.