plot.havok | R Documentation |
Generic plotting function for object of class ("havok")
## S3 method for class 'havok'
plot(x, what = "interactive", ...)
x |
A "havok" object. |
what |
See details. |
... |
Other calls to plot. |
Arguments for what
parameter:
"Interactive"
- An interactive plotting function.
"Reconstruction"
- Scaled reconstruction of the major component of a time-series.
"Forcing"
- Forcing vector derived from HAVOK.
"Both"
- A combination of 'reconstruction' and 'forcing'.
"U-modes"
- U modes of the reconstructed time series.
"Vembedded"
- A 2D reconstruction of the attractor based on Eigen vectors.
"Nonlinear"
- A 2D reconstruction of the attractor with nonlinear regions colored red.
"SSmod"
- Ouput time series of a HAVOK state space model.
"SSembedded"
- A 2D reconstruction of the attractor based a HAVOK state space model.
## Not run:
#Generate Data
##Set Lorenz Parameters
parameters <- c(s = 10, r = 28, b = 8/3)
n <- 3
state <- c(X = -8, Y = 8, Z =27) ##Inital Values
#Intergrate
dt <- 0.001
tspan <- seq(dt, 200, dt)
N <- length(tspan)
Lorenz <- function(t, state, parameters) {
with(as.list(c(state, parameters)), {
dX <- s * (Y - X)
dY <- X * (r - Z) - Y
dZ <- X * Y - b * Z
list(c(dX, dY, dZ))
})
}
out <- ode(y = state, times = tspan, func = Lorenz, parms = parameters, rtol = 1e-12, atol = 1e-12)
xdat <- out[, "X"]
t <- out[, "time"]
hav <- havok(xdat = xdat, dt = dt, stackmax = 100, lambda = 0,
rmax = 15, polyOrder = 1, useSine = FALSE)
plot(hav)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.