Return interpolated matrix for given inputs
This two-dimensional case assumes the matrix is defined as a function of two independent variables, x = [ x1 x2 x3... xi xi+1 ... xn] and y = [ y1 y2 y3 ... yj yj+1 ... ym]. For given values of x and y, four matrices are interpolated. Then for xi < x < xi+1 and yj < y < yj+1, the output matrix is given by
where the two interpolation fractions are denoted by
In the two-dimensional case, the interpolation is carried out first on x and then y.
The matrix to be interpolated should be four dimensional, the first two dimensions corresponding to the matrix at each value of x and y. For example, if you have four matrices A, B, C, and D defined at (x = 0.0,y = 1.0), (x = 0.0,y = 3.0), (x = 1.0,y = 1.0) and (x = 1.0,y = 3.0), then the input matrix is given by
matrix(:,:,1,1) = A;
matrix(:,:,1,2) = B;
matrix(:,:,2,1) = C;
matrix(:,:,2,2) = D;
|Contains the first interpolation index i.|
|Contains the first interpolation fraction λx.|
|Contains the second interpolation index j.|
|Contains the second interpolation fraction λy.|
|Contains the interpolated matrix.|
This block must be driven from the Simulink® Prelookup block.