plot.ODEnetwork {ODEnetwork}R Documentation

Plots Results of ODEnetwork

Description

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

Usage

## 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

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")

[Package ODEnetwork version 1.3.2 Index]