| flowField | R Documentation |
Plots the flow or velocity field for a one- or two-dimensional autonomous ODE system. This function was written Michael J Grayling as part of the archived phaseR package and re-published in the this 'epimdr2' package under original GPL-3 lisence
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],
...
)
deriv |
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 n 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 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 |
ylim |
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 |
parameters |
Parameters of the ODE system, to be passed to |
system |
Set to either |
points |
Sets the density of the line segments to be plotted;
|
col |
Sets the colour of the plotted line segments. Should be a
|
arrow.type |
Sets the type of line segments plotted. If set to
|
arrow.head |
Sets the length of the arrow heads. Passed to
|
frac |
Sets the fraction of the theoretical maximum length line
segments can take without overlapping, that they can actually attain. In
practice, |
add |
Logical. If |
xlab |
Label for the x-axis of the resulting plot. |
ylab |
Label for the y-axis of the resulting plot. |
... |
Additional arguments to be passed to either
|
Returns a list with the following components (the
exact make up is dependent on the value of system):
add |
As per input. |
arrow.head |
As per input. |
arrow.type |
As per input. |
col |
As per input, but with possible editing if a
|
deriv |
As per input. |
dx |
A |
dy |
A |
frac |
As per input. |
parameters |
As per input. |
points |
As per input. |
system |
As per input. |
x |
A |
xlab |
As per input. |
xlim |
As per input. |
y |
A |
ylab |
As per input. |
ylim |
As per input. |
Michael J Grayling
arrows, plot
#See archived phaseR package for examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.