Engee documentation

Interpolate Matrix(x)

Matrix Interpolation.

blockType: SubSystem

Path in the library:

/Aerospace/GNC/Control/Interpolate Matrix(x)

Description

The Interpolate Matrix(x) block interpolates an array of matrices. The array to be interpolated must be three-dimensional: the first two dimensions correspond to the rows and columns of the matrices, the third dimension corresponds to the index of the matrix in the array. For example, if it is necessary to specify three 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]. The resulting array has a size of 2 by 2 by 3.

The interpolated matrix is calculated by the formula:

where - is the array matrix, is the interpolation parameter.

Interpolation parameter is equal to

For example, if and , the interpolated matrix will be equal to the first array matrix. If and , the interpolated matrix will be equal to the second array matrix. If and , the interpolated matrix will be equal to the second array matrix. If and , the interpolated matrix will be equal to the third array matrix.

Ports

Input

xk - matrix index
scalar

Index of the matrix in the array. Indexing starts from zero.

Data types: Float64.

xf - interpolation parameter
scalar

Interpolation parameter. The parameter takes 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)] (by default) | matrix

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