Signal Processing Toolbox |
Common Sequences: Unit Impulse, Unit Step, and Unit Ramp
Since MATLAB is a programming language, an endless variety of different signals is possible. Here are some statements that generate several commonly used sequences, including the unit impulse, unit step, and unit ramp functions:
t = (0:0.001:1)';
y = [1; zeros(99,1)]; % impulse
y = ones(100,1); % step (filter assumes 0 initial cond.)
y = t; % ramp
y = t.^2;
y = square(4*
t);
All of these sequences are column vectors. The last three inherit their shapes from t
.
Waveform Generation: Time Vectors and Sinusoids | Multichannel Signals |
© 1994-2005 The MathWorks, Inc.