DSP Blockset Previous page   Next Page
Constant Diagonal Matrix

Generate a square, diagonal matrix

Library

Description

The Constant Diagonal Matrix block outputs a square diagonal matrix constant. The Constant along diagonal parameter determines the values along the matrix diagonal. This parameter can be a scalar to be repeated for all elements along the diagonal, or a vector containing the values of the diagonal elements. To generate the identity matrix, set the Constant along diagonal to 1, or use the Identity Matrix block.

The output is frame based when the Frame-based output check box is selected; otherwise, the output is sample based.

Dialog Box

Opening this dialog box causes a running simulation to pause. See Changing Source Block Parameters in the online Simulink documentation for details.

Constant(s) along diagonal
Specify the values of the elements along the diagonal. You can input a scalar or a vector. Tunable.
If you specify any data type information in this field, it is overridden by the value of the Output data type parameter.
Frame-based output
Select to cause the output of the block to be frame based. Otherwise, the output is sample based.
Show additional parameters
If selected, additional parameters specific to implementation of the block become visible as shown.

Allow overrides from DSP Fixed-Point Attributes blocks
If you select this parameter, and if the Output data type parameter is set to Fixed-point, fixed-point data types for this block may be set by DSP Fixed-Point Attributes blocks in your model. If this parameter is unselected, the data types are always set by the parameters in the block mask.
Output data type
Specify the output data type in one of the following ways:
Word length
Specify the word length, in bits, of the fixed-point output data type. This parameter is only visible if Fixed-point is selected for the Output data type parameter.
User-defined data type
Specify any built-in or fixed-point data type. You can specify fixed-point data types using the sfix, ufix, sint, uint, sfrac, and ufrac functions from the Fixed-Point Blockset. This parameter is only visible if User-defined is selected for the Output data type parameter.
Set fraction length in output to
Specify the scaling of the fixed-point output by either of the following two methods:
Fraction length
For fixed-point output data types, specify the number of fractional bits, or bits to the right of the binary point. This parameter is only visible if Fixed-point or User-defined is selected for the Output data type parameter, and if User-defined is selected for the Set fraction length in output to parameter.

Supported Data Types

To learn how to convert your data types to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.

See Also

Create Diagonal Matrix
DSP Blockset
DSP Constant
DSP Blockset
Identity Matrix
DSP Blockset
diag
MATLAB

Also see Creating Signals Using Constant Blocks for how to use this and other blocks to generate constant signals.


Previous page  Complex Exponential Constant Ramp Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS