| DSP Blockset | Search  Help Desk |
| Zero Pad | See Also |
Increase the input frame size by appending zeros.
Library
Signal Operations, in General DSPDescription
The Zero Pad block increases the frame size of the input from Mi to Mo by appending an equal number of zeros to each channel. The output frame size, Mo, is specified by the Output frame size parameter. If the Output frame size value is smaller than the input frame size (Mo<Mi), and the Allow truncation of input check box is enabled, the block truncates elements at the end of each input frame as necessary. If the Allow truncation of input check box is disabled, the input is not altered. The Zero Pad block assumes that the input is an Mi-by-N frame matrix. Each of the N frames in the matrix contains Mi sequential time samples from an independent signal. The illustration below shows a 6-by-4 matrix input:
The Number of channels parameter specifies the number of independent channels (columns, N) in the matrix. A value of 1 indicates that the input is a vector (i.e., a single frame).
The figure below illustrates how zero-padding increases the number of matrix rows from Mi to Mo by appending zeros at the end of each frame.

Note
If you expect to generate code for the Zero Pad 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

-1 effectively disables zero-padding by passing the input through unchanged.See Also
Repeat