DSP Blockset    
Zero Pad

Alter the input size by zero-padding or truncating rows and/or columns.

Library

Signal Operations

Description

The Zero Pad block changes the size of the input matrix from Mi-by-Ni to Mo-by-No by zero-padding or truncating along the rows, the columns, or both dimensions. The dimensions of the output, Mo and No, are specified by the Number of output rows and Number of output columns parameters, respectively. You can set Action when truncation occurs so that the block gives a warning or an error when truncation occurs.

The Zero pad along parameter specifies how the input should be altered. The options are:

Example

In the model below, the 3-by-3 input is zero-padded along the column dimension to 5-by-3. The parameter settings in the Zero Pad block are:

Dialog Box

Zero pad along
The direction along which to pad or truncate. Columns specifies that the row dimension should be changed to Mo; Rows specifies that the column dimension should be changed to No; Columns and rows specifies that both column and row dimensions should be changed; None disables padding and truncation and passes the input through to the output unchanged.
Number of output rows
The desired number of rows in the output, Mo. This parameter is enabled when Columns or Columns and rows is selected in the Zero pad along menu.
Number of output columns
The desired number of columns in the output, No. This parameter is enabled when Rows or Columns and rows is selected in the Zero pad along menu.
Action When Truncation Occurs
The block's behavior when the input matrix is truncated. It gives a Warning, an Error, or gives no indication of the truncation when set to None.

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 Concatenation
Simulink
Pad
DSP Blockset
Repeat
DSP Blockset
Submatrix
DSP Blockset
Upsample
DSP Blockset
Variable Selector
DSP Blockset

Also see Signal Operations for a list of all the blocks in the Signal Operations library.


  Yule-Walker Method Function Reference