Learn R Programming

ODEnetwork (version 1.3.2)

setState: Set starting State

Description

Sets the starting State for the given ODEnetwork.

Usage

setState(odenet, state1, state2)

Arguments

odenet

[ODEnetwork] List of class ODEnetwork.

state1

[numeric(n)] Numeric vector of length n (same as in ODEnetwork) with position or angle.

state2

[numeric(n)] Numeric vector of length n (same as in ODEnetwork) with velocity or magnitude.

Value

an extended list of class [ODEnetwork].

Examples

Run this code
# NOT RUN {
masses <- 4:6
dampers <- diag(1:3)
springs <- diag(7:9)
odenet <- ODEnetwork(masses, dampers, springs)
position <- rep(10, 3)
velocity <- rep(0, 3)
odenet <- setState(odenet, position, velocity)
# }

Run the code above in your browser using DataLab