<< nan_mgrp2idx utility functions nan_prepad >>

NaN Toolbox >> NaN Toolbox > utility functions > nan_postpad

nan_postpad

append the scalar

Calling Sequence

y = nan_postpad (x, l,c)
y = nan_postpad (x, l,c,dim)

Description

append the scalar value c to the vector x until it is of length l. If the third argument is not supplied, a value of 0 is used.

If length (x > l), elements from the end of x are removed until a vector of length l is obtained.

If x is a matrix, elements are prepended or removed from each row.

If the optional dim argument is given, then operate along this dimension.

See also

Authors


<< nan_mgrp2idx utility functions nan_prepad >>