Adds elements to an array of any dimension. padarray(x, n) adds n zeros to both ends of x.
y = padarray(x, n)
y = padarray(x, n, element)
y = padarray(x, n, option)
y = padarray(x, n, element, direction)
y = padarray(x, n, option, direction)
Array to add elements to. x is an array of any dimension.
Number of elements to add to each dimension of x. n is a vector. The length of n must be equal to the number of dimensions of x.
Element to add to x repeatedly. element is a scalar.
Specifies how to add elements to x. option is a string that accepts the following values:
Adds elements by circularly repeating the existing elements.
Adds elements by repeating the element on the border.
Adds elements by mirroring elements about the border.
Direction to add elements to x. direction is a string that accepts the following values:
Adds elements to both ends of x.
Adds elements before the start of x.
Adds elements after the end of x.
x with added elements.
X = rand(10, 1); Y = padarray(X, 6, 0, 'post')
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices