DSP Blockset
  Go to block:
    Search    Help Desk 
Matrix Scaling    See Also

Scale the rows or columns of a matrix by a specified vector.

Library

Matrix Functions, in Math Functions

Description

The Matrix Scaling block scales the rows or columns of the input matrix A by the input vector D.

When the Mode parameter is set to Scale rows, the block multiplies each element of vector 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, the block multiplies each element of vector D across the corresponding column of matrix A.

This is equivalent to postmultiplying A by a diagonal matrix with diagonal D.

The length of vector D must be consistent with the intended matrix operation (i.e., D must have the same length as the dimension of A being scaled). The output is the same size as the input matrix A.

Note
If you expect to generate code for the Matrix Scaling block using the Real-Time Workshop, you should ensure that inputs are contiguous in memory. See the Contiguous Copy block for more information.

Dialog Box

Mode
The mode of operation, row scaling or column scaling.
Number of columns in A
The number of columns in the input matrix.

See Also

Matrix Multiplication


[ Previous | Help Desk | Next ]