User`s guide

Matrix Scaling
5-286
5Matrix Scaling
Purpose 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.
y = diag(D)*A % Equivalent MATLAB code
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.
y = A*diag(D) % Equivalent MATLAB code
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.
d
1
d
2
d
3
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
d
1
a
11
d
1
a
12
d
1
a
13
d
2
a
21
d
2
a
22
d
2
a
23
d
3
a
31
d
3
a
32
d
3
a
33
×
×
×
d
1
d
2
d
3
a
11
a
12
a
13
a
21
a
22
a
23
a
31
a
32
a
33
d
1
a
11
d
2
a
12
d
3
a
13
d
1
a
21
d
2
a
22
d
3
a
23
d
1
a
31
d
2
a
32
d
3
a
33
×××