| Signal Processing Blockset™ | ![]() |
Math Functions / Matrices and Linear Algebra / Matrix Operations
dspmtrx3
The Matrix Square block computes the square of an M-by-N input matrix, u, by premultiplying with the Hermitian transpose.
y = u' * u % Equivalent MATLAB code
A length-M 1-D vector input is treated as an M-by-1 matrix. For both sample-based and frame-based inputs, output y is sample based with dimension N-by-N.
The Matrix Square block is useful in a variety of applications:
General matrix squares — The Matrix Square block computes the output matrix, y, without explicitly forming u'. It is therefore more efficient than other methods for computing the matrix square.
Sum of squares — When the input is a column vector (N=1), the block's operation is equivalent to a multiply-accumulate (MAC) process, or inner product. The output is the sum of the squares of the input, and is always a real scalar.
Correlation matrix — When the input is a row vector (M=1), the output, y, is the symmetric autocorrelation matrix, or outer product.

Double-precision floating point
Single-precision floating point
| Matrix Multiply | Signal Processing Blockset |
| Matrix Product | Signal Processing Blockset |
| Matrix Sum | Signal Processing Blockset |
| Transpose | Signal Processing Blockset |
![]() | Matrix Product | Matrix Sum | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |