You are on page 1of 1

clc

clear all
close all
% % ploting of unit impulse sgnal for discrete we need stem.
% disp('unit impulse signal generation');
% N=input('Enter number of samples: ');
% n=-N:1:N;
% x=[zeros(1,N),1,zeros(1,N)];
% stem(n,x);
% xlabel('sample');
% ylabel('amplitude');
% title('UNIT IMPULSE SIGNAL');

% unit step
% impulse@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
% @@@@@@@@@@@@@@@@@@@@@@@@@@@@
% disp('unit impulse signal generation');
% N=input('Enter number of samples: ');
% n=-N:1:N;
% x=[zeros(1,N),1,ones(1,N)];
% stem(n,x);
% xlabel('sample');
% ylabel('amplitude');
% title('UNIT IMPULSE SIGNAL');

% rectangle
t=-1:0.001:1;
y=rectpuls(t);
plot(t,y);

You might also like