plot.ODEnetwork: Plots Results of ODEnetwork

Description Usage Arguments Examples

View source: R/plot.R

Description

Plots the results of simuNetwork of the given ODEnetwork in different ways.

Usage

1
2
## S3 method for class 'ODEnetwork'
plot(x, ..., state = "12", var = NULL)

Arguments

x

[ODEnetwork]
List of class ODEnetwork.

...

Additional arguments.

state

[character]
The type of result, that is plotted. If 1, only state1 (position or angle) is plotted over time. If 2, only state2 (velocity or magnitude) is plotted over time. If 12, state1 and state2 are plotted over time. If 1vs2, state2 is plotted over state1. Default is state12

var

[numeric(n)]
Subset of variables to plot. Default is NULL, which plots all variables.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
masses <- c(1, 2)
dampers <- diag(c(0.1, 0.5))
dampers[1, 2] <- 0.05
springs <- diag(c(4, 10))
springs[1, 2] <- 6
odenet <- ODEnetwork(masses, dampers, springs)
odenet <- setState(odenet, c(1, 3), c(0, 0))
odenet <- simuNetwork(odenet, seq(0, 10, by = 0.05))
plot(odenet)
plot(odenet, var = 2L)
plot(odenet, state = "1")
plot(odenet, state = "2")
plot(odenet, state = "1vs2")

surmann/ODEnetwork documentation built on April 6, 2020, 8:53 p.m.