DSP Blockset | ![]() ![]() |
Scale the rows or columns of a matrix by a specified vector.
Library
Math Functions / Matrices and Linear Algebra / Matrix Operations
Description
The Matrix Scaling block scales the rows or columns of the M-by-N input matrix A
by the values in input vector D
.
When the Mode parameter is set to Scale Rows (D*A), input D
can be a 1-D or 2-D vector of length M, and the block multiplies each element of D
across the corresponding row of matrix A
.
This is equivalent to premultiplying A
by a diagonal matrix with diagonal D
.
When the Mode parameter is set to Scale Columns (A*D), input D
can be a 1-D or 2-D vector of length N, and the block multiplies each element of D
across the corresponding column of matrix A
.
This is equivalent to postmultiplying A
by a diagonal matrix with diagonal D
.
The output is the same size as the input matrix, A
. If both inputs are sample-based, the output is sample-based; otherwise, the output is frame-based.
Dialog Box
Supported Data Types
To learn how to convert to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.
See Also
Matrix Multiply |
DSP Blockset |
Matrix Product |
DSP Blockset |
Matrix Sum |
DSP Blockset |
Also see Matrix Operations for a list of all the blocks in the Matrix Operations library.
![]() | Matrix Product | Matrix Square | ![]() |