User`s guide

Zero Pad
5-552
5Zero Pad
Purpose 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 M
i
-by-N
i
to
M
o
-by-N
o
by zero-padding or truncating along the rows, the columns, or both
dimensions. The dimensions of the output, M
o
and N
o
, 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:
Columns
When Columns is selected, the Number of output rows parameter (M
o
) is
enabled, and the block pads or truncates each input column by an equal
amount. If M
o
>M
i
, the block pads by adding M
o
-M
i
rows of zeros to the
bottom of the matrix. If M
o
<M
i
, the block truncates by deleting M
i
-M
o
rows
from the bottom of the matrix. In both cases, the number of columns is
unchanged (N
o
=N
i
). A 1-D vector input is zero padded or truncated at the
“bottom,” and the output is a 1-D vector.
Rows
When Rows is selected, the Number of output columns parameter (N
o
) is
enabled, and the block pads or truncates each input row by an equal amount.
If N
o
>N
i
, the block pads by adding N
o
-N
i
columns of zeros to the right side of
the matrix. If N
o
<N
i
, the block truncates by deleting N
i
-N
o
columns from the
right side of the matrix. In both cases, the number of rows is unchanged
(M
o
=M
i
). A 1-D vector input is zero padded or truncated at the “bottom,” and
the output is a 1-D vector.
Columns and rows
When Columns and rows is selected, both the Number of output rows
parameter (M
o
) and the Number of output columns parameter (N
o
) are
enabled, and the block pads or truncates rows and columns as specified. A
length-M
i
1-D vector input is treated as an M
i
-by-1 matrix and the output is
an M
o
-by-N
o
matrix.