View source: R/map_linearmap.R
create_linearmap_map | R Documentation |
Create a linear mapping between the variables at the source indices to the variables at the target indices, which is of the form \mjsdeqn \vecy = \vecy_\textrmref + S (\vecp - \vecp_\textrmref)
create_linearmap_map()
The following fields are required in the parameter list to initialize the mapping:
mapname | Name of the mapping |
maptype | Must be "linearmap_map" |
src_idx | Vector of source indices |
tar_idx | Vector of target indices. |
yref | The vector \mjseqn\vecy_\textrmref given in the formula. |
pref | The vector \mjseqn\vecp_\textrmref given in the formula. |
S | The matrix S given in the formula. |
Returns a list of functions to operate with the mapping, see create_maptype_map
.
Other mappings:
create_compound_map()
,
create_convolution_with_xtrafo_map()
,
create_derivative2nd_map()
,
create_derivative_map()
,
create_linearinterpol_map()
,
create_linearinterpol_with_xtrafo_map()
,
create_maptype_map()
,
create_map()
,
create_nonlinear_map()
,
create_normerr_map()
,
create_product_map()
params <- list( mapname = "mylinearmap", maptype = "linearmap_map", src_idx = 1:2, tar_idx = 3:5, yref = rep(10, 3), pref = c(2, 4), S = matrix(c(1, 2, 3, 4, 5, 6), nrow=3, ncol=2) ) mymap <- create_linearmap_map() mymap$setup(params) x <- c(1,-2,0,0,0) mymap$propagate(x) mymap$jacobian(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.