Pad
Pad or truncate specified dimension(s)
Libraries:
DSP System Toolbox /
Signal Operations
Description
The Pad block extends or crops the dimensions of an input signal by padding or truncating along its columns, rows, columns and rows, or along any other dimension(s) that you specify. The block truncates the input when you specify output dimensions that are shorter than the corresponding input dimensions. If the input and output lengths are the same, the block acts as a pass-through.
You can enter the pad value in the block mask or via an input port. You can enter
output sizes in the block mask, or have the block pad the specified dimensions until
their length is the next highest power of two. The Pad signal at
parameter controls whether the block pads or truncates the input signal dimensions at
the beginning, end, or both. For odd pad or truncation lengths, the extra pad or
truncation value is applied at the end of the signal. When the block is in the
Specified dimensions
mode, you can specify either the
output size or the pad size.
You can configure the block to warn or error when an input signal is truncated using the Action when truncation occurs parameter.
Examples
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
Version History
Introduced before R2006a