DSP Blockset | ![]() ![]() |
Library
Math Functions / Matrices and Linear Algebra / Matrix Operations
Description
The Matrix Multiply block multiplies n input matrices, A, B, C, ..., Un, in the forward direction, where n is specified by the Number of input ports parameter and Un is the input at the nth port.
Y = ((((A*B)*C)*D) ... Un
)% Equivalent MATLAB code
All inputs must have sizes compatible for matrix multiplication; that is, size(A,2)
= size(B,1)
, size(B,2)
= size(C,1)
, and so on. Inputs can be real, complex, sample-based, or frame-based in any combination, but all inputs must have the same precision, single or double. A length-M 1-D vector input at any port is treated as an M-by-1 matrix.
The size of sample-based output Y
is [size(A,1) size(
Un,2)]
. That is, Y
is MA-by-NUn.
Algorithm
The Matrix Multiply block is optimized to use at most two temporary variables for storage of intermediate results.
Dialog Box
See Also
Dot Product |
Simulink |
Matrix Product |
DSP Blockset |
Matrix Scaling |
DSP Blockset |
Product |
Simulink |
![]() | Matrix 1-Norm | Matrix Product | ![]() |