View source: R/map_linearinterpol.R
create_linearinterpol_map | R Documentation |
Creates a map to linearly interpolate the values at the source indices given on a one-dimensional mesh to the one-dimensional mesh associated with the variables at the target indices.
create_linearinterpol_map()
The following fields are required in the parameter list to initialize the mapping:
mapname | Name of the mapping |
maptype | Must be "linearinterpol_map" |
src_idx | Vector of source indices |
tar_idx | Vector of target indices |
src_x | Vector with the mesh associated with the source indices |
tar_x | Vector with the mesh associated with the target indices |
zero_outside | Default is FALSE . If TRUE, y-values of target x-values outside
the limits of the source mesh will be zero, otherwise this situation
is not allowed. |
scalefact | A scalar that is multiplied with the resulting numbers from linear interpolation to obtain the final result of the mapping. Default is 1. |
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_with_xtrafo_map()
,
create_linearmap_map()
,
create_maptype_map()
,
create_map()
,
create_nonlinear_map()
,
create_normerr_map()
,
create_product_map()
params <- list( mapname = "mylinearintmap", maptype = "linearinterpol_map", src_idx = 1:3, tar_idx = 4:6, src_x = c(1,5,10), tar_x = c(4,5,6) ) mymap <- create_linearinterpol_map() mymap$setup(params) x <- c(1,2,3,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.