MATLAB program for Unit Impulse Response signal Generation


Unit Impulse Response or Unit sample sequence:


The unit impulse signal is written as,



Unit Impulse Response or Unit sample sequence:
N=input('Enter the size of sequence=');
t=-N:N;
l=length(t);
for ii=1:l
    if t(ii)==0
        seq(ii)=1
    else
        seq(ii)=0
    end
end
stem (t,seq);
title('Unit impulse Response');
xlabel('n');
ylabel('Amplitude');
Output waveform:
Enter the size of sequence=4



No comments