function x = expsig(N,a) % expsig --> Exponential signal. % % % x = expsig(N,a) % % % Generates an N-vector, which is the exponential signal a^n. % If the parameter a is real, then x(n) is a real signal. When % the parameter a is complex valued, it can be expressed as % a = r*exp(j*theta) where r and theta are now the parameters. % % % unitsig --> Unit sample, unit step, and unit ramp sequences. % sinsig --> Sum of sinusoidal sequences. % % Peter S.K. Hansen, IMM, Technical University of Denmark % % Last revised: February 7, 2000 %----------------------------------------------------------------------- % Check the required input arguments. if (nargin < 2) error('Not enough input arguments.') end % Generate the sequence. x = a.^(0:N-1).'; %----------------------------------------------------------------------- % End of function expsig %-----------------------------------------------------------------------