Learn R Programming

QPot (version 1.0)

VecDecomVec: Vector decomposition and remainder fields

Description

This function calculates the vector field.

Usage

VecDecomVec(x.num.steps, y.num.steps, x.rhs, y.rhs, x.bound, y.bound)

Arguments

x.num.steps
The number of steps between the minimum and maximum x value defined in x range.
y.num.steps
The number of steps between the minimum and maximum y value defined in y range.
x.rhs
A string containing the right hand side of the equation for x.
y.rhs
A string containing the right hand side of the equation for y.
x.bound
two-element vector with respective minimum and maximum x values.
y.bound
two-element vector with respective minimum and maximum y values.

Examples

Run this code
# First, the system of equations
	equationx <- "1.54*x*(1.0-(x/10.14)) - (y*x*x)/(1.0+x*x)"
	equationy <- "((0.476*x*x*y)/(1+x*x)) - 0.112590*y*y"

# Second, shared parameters for each quasi-potential run
	xbounds <- c(-0.5, 20.0)
	ybounds <- c(-0.5, 20.0)
	xstepnumber <- 1000
	ystepnumber <- 1000

# Third, create the deterministic skeleton vector field
	VDV <- VecDecomVec(x.num.steps = xstepnumber, y.num.steps = ystepnumber, x.rhs = equationx,
	y.rhs = equationy, x.bound = xbounds, y.bound = ybounds)

Run the code above in your browser using DataLab