Home > freetb4matlab > general > prepad.m

prepad

PURPOSE ^

% Prepend (append) the scalar value @var{c} to the vector @var{x}

SYNOPSIS ^

function y = prepad (x, l, c, dim)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} prepad (@var{x}, @var{l}, @var{c})
% @deftypefnx {Function File} {} prepad (@var{x}, @var{l}, @var{c}, @var{dim})
% Prepend (append) the scalar value @var{c} to the vector @var{x}
% until it is of length @var{l}.  If the third argument is not
% supplied, a value of 0 is used.
%
% If @code{length (@var{x}) > @var{l}}, elements from the beginning (end) of
% @var{x} are removed until a vector of length @var{l} is obtained.
%
% If @var{x} is a matrix, elements are prepended or removed from each row.
%
% If the optional @var{dim} argument is given, then operate along this
% dimension.
% @seealso{postpad}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003