Extract or replace subsets of three-velocities
elements to extract or replace
These methods (should) work as expected: an object of class
3vel is a three-column matrix with rows corresponding to
three-velocities; a single argument is interpreted as a row number.
Salient use-cases are
u[1:5] <- u and
u <- 0.
To extract a single component, pass a second index:
returns the x- component of the three-velocity.
u but I am not sure this is
desirable. Maybe it should return
unclass(u) or perhaps
u <- x to replace entries of
1 2 3 4 5 6 7
u <- r3vel(10) u[1:4] u[5:6] <- 0 u[7:8] <- u u[,1] <- 0.1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.