Engee documentation

Interpolate Matrix(x,y)

Matrix Interpolation.

interpolate matrix xy

Description

The Interpolate Matrix(xy) block interpolates an array of matrices. The array to be interpolated must be four-dimensional: the first two dimensions correspond to the rows and columns of the matrices, the third and fourth dimensions correspond to the matrix indices in the array. For example, if it is necessary to specify four matrices of size 2 by 2 , , and for ( ), ( ), ( ) and ( ) respectively, then the value of the Matrix to interpolate parameter is set as [A; ; ; ; B; ; ; ; ; ; C; ; ; ; D]. The resulting array has size 2 by 2 by 2 by 2 by 2 by 2.

The interpolated matrix is calculated by the formula:

where - -th array matrix, - interpolation parameters.

Interpolation parameters и are equal to

Ports

Input

xk - the first index of the matrix
scalar

The first index of the matrix in the array. Indexing starts from zero.

Data types: Float64.

xf - first interpolation parameter
scalar

First interpolation parameter . The parameter takes a value from 0 to 1.

Data types: Float64.

yk - second index of matrix
scalar

The second index of the matrix in the array. Indexing starts from zero.

Data types: Float64.

yf - second interpolation parameter
scalar

Second interpolation parameter . The parameter takes a value from 0 to 1.

Data types: Float64.

Output

Matrix(x) - interpolated matrix
matrix

An interpolated matrix whose dimension is given by the first two dimensions of the matrix array.

Data types: Float64.

Parameters

Matrix to interpolate - array of matrices
[ones(2,2); ; ; ones(2,2); ; ; ; ones(2,2); ; ; ; ones(2,2)] (by default) | matrix

Matrix array. All matrices in the array must be of the same size.

Additional options

C code generation: Yes