Programme For The Generation of Unit Impulse Signal
Programme For The Generation of Unit Impulse Signal
>> t=-2:1:2;
>> y=[zeros(1,2),ones(1,1),zeros(1,2)];subplot(2,2,1);stem(t,y);
>> ylabel('Amplitude-->');
>> xlabel('(a)n--->');
Programme for the generation of unit step sequence [u(n)-u(n-N)]n=input('enter the N value');
>> t=0:1:n-1;
>> y1=ones(1,n);subplot(2,2,2);
>> stem(t,y1);ylabel('Amplitude-->');
>> xlabel('n-->');
Fig-Ramp signal
>> t=0:.01:pi;
>> y=sin(2*pi*t);figure(2);
>> subplot(2,2,1);plot(t,y);ylabel('Amplitude -->');
>> xlabel('(a) n -->');
>>
>> t=0:0.1:pi;
>> y=cos(2*pi*t);
>> subplot(2,1,1);plot(t,y);ylabel('Amplitude -->');
>> xlabel('(a) n -->');
>>
Fig-Exponential signal