
Impulse, Step, and Ramp Functions
2-5
Impulse, Step, and Ramp Functions
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)';
imp = [1; zeros(99,1)]; % Impulse
unit_step = ones(100,1); % Step (with 0 initial cond.)
ramp_sig = t; % Ramp
quad_sig = t.^2; % Quadratic
sq_wave = square(4*pi*t); % Square wave with period 0.5
All of these sequences are column vectors. The last three inherit their shapes from t.
Kommentare zu diesen Handbüchern