Plots the flow or velocity field for a one- or two-dimensional autonomous ODE system.
flowField(deriv, xlim, ylim, parameters = NULL, system = "two.dim",
points = 21, col = "gray", arrow.type = "equal",
arrow.head = 0.05, frac = 1, add = TRUE, xlab = if (system ==
"two.dim") state.names[1] else "t", ylab = if (system == "two.dim")
state.names[2] else state.names[1], ...)
A function computing the derivative at a point for the ODE
system to be analysed. Discussion of the required format of these functions
can be found in the package vignette, or in the help file for the
function ode
.
In the case of a two-dimensional system, this sets the limits of
the first dependent variable in which gradient reflecting line segments
should be plotted. In the case of a one-dimensional system, this sets the
limits of the independent variable in which these line segments should be
plotted. Should be a numeric
vector
of length
two.
In the case of a two-dimensional system this sets the limits of
the second dependent variable in which gradient reflecting line segments
should be plotted. In the case of a one-dimensional system, this sets the
limits of the dependent variable in which these line segments should be
plotted. Should be a numeric
vector
of length
two.
Set to either "one.dim"
or "two.dim"
to indicate
the type of system being analysed. Defaults to "two.dim"
.
Sets the density of the line segments to be plotted;
points
segments will be plotted in the x and y directions. Fine tuning
here, by shifting points
up and down, allows for the creation of more
aesthetically pleasing plots. Defaults to 11
.
Sets the type of line segments plotted. If set to
"proportional"
the length
of the line segments
reflects the magnitude of the derivative. If set to "equal"
the line
segments take equal lengths, simply reflecting the gradient of the
derivative(s). Defaults to "equal"
.
Sets the length of the arrow heads. Passed to
arrows
. Defaults to 0.05
.
Sets the fraction of the theoretical maximum length line
segments can take without overlapping, that they can actually attain. In
practice, frac
can be set to greater than 1 without line segments
overlapping. Fine tuning here assists the creation of aesthetically pleasing
plots. Defaults to 1
.
Logical. If TRUE
, the flow field is added to an existing
plot. If FALSE
, a new plot is created. Defaults to TRUE
.
Label for the x-axis of the resulting plot.
Label for the y-axis of the resulting plot.
Returns a list
with the following components (the
exact make up is dependent on the value of system
):
As per input.
As per input.
As per input.
As per input, but with possible editing if a
character
vector
of the wrong
length
was supplied.
As per input.
A numeric
matrix
. In the
case of a two-dimensional system, the values of the derivative of the first
dependent derivative at all evaluated points.
A numeric
matrix
. In the
case of a two-dimensional system, the values of the derivative of the second
dependent variable at all evaluated points. In the case of a one-dimensional
system, the values of the derivative of the dependent variable at all
evaluated points.
As per input.
As per input.
As per input.
As per input.
A numeric
vector
. In the
case of a two-dimensional system, the values of the first dependent variable
at which the derivatives were computed. In the case of a one-dimensional
system, the values of the independent variable at which the derivatives were
computed.
As per input.
As per input.
A numeric
vector
. In the
case of a two-dimensional system, the values of the second dependent variable
at which the derivatives were computed. In the case of a one-dimensional
system, the values of the dependent variable at which the derivatives were
computed.
As per input.
As per input.
# NOT RUN {
#See archived phaseR package for examples
# }
Run the code above in your browser using DataLab