Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Subplot-1: Unit sample sequence, where sample position, n= -(L+M) to (L+N).
- a=-11; %here L+M = 11 and L+N = 14
- b=14;
- n=a:b;
- y=[zeros(1,abs(a)),ones(1,1),zeros(1,b)];
- subplot(3,1,1);
- stem(n,y,'LineWidth',1,'Color','g');
- xlabel('Sample position');
- ylabel('Amplitude');
- title('Unit impluse signal');
- %Subplot-2: Unit step sequence, where sample position, n= -(L+M) to (L+N).
- a=-11;
- b=14;
- n=a:b;
- y=[zeros(1,abs(a)),ones(1,1),ones(1,b)];
- subplot(3,1,2);
- stem(n,y,'LineWidth',1,'Color','b');
- xlabel('Sample position');
- ylabel('Amplitude');
- title('Unit step sequence');
- % Subplot-3: Unit ramp sequence, where sample position, n= 0 to (L+M+N).
- n=0:16; % here L+M+N = 9+2+5 = 16;
- y=n;
- subplot(3,1,3);
- stem(n,y,'LineWidth',1 ,'Color','m');
- xlabel('Sample position');
- ylabel('Amplitude');
- title('Unit ramp sequence');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement