Engee documentation

Interpolate Matrix(x,y,z)

Matrix Interpolation.

interpolate matrix xyz

Description

The Interpolate Matrix(xyz) block interpolates an array of matrices. The array to be interpolated must be five-dimensional: the first two dimensions correspond to rows and columns of matrices, the third, fourth and fifth dimensions correspond to matrix indices in the array. For example, if you want to specify eight matrices of size 2 by 2 , , , , , , and for , , , , , , and respectively, then the value of the Matrix to interpolate parameter is specified as [A; ; ; ; ; B; ; ; ; ; C; ; ; ; ; D; ; ; ; ; ; E; ; ; ; F; ; ; ; ; G; ; ; ; E]. The resulting array has size 2 by 2 by 2 by 2 by 2 by 2 by 2 by 2.

The interpolated matrix is calculated using the formula:

where

In these formulas. - -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.

zk - third index of matrix
scalar

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

Data types: Float64.

zf - third interpolation parameter
scalar

The third 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); ; ; ; ; ; 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