n=-10:10;
impulse=(n==0);
subplot(3,2,1);
stem(n,impulse);
title('unit impulse signal');
xlabel('n');ylabel('s[n]'));
step=(n>=0);
subplot(3,2,2);
stem(n,step);
title('unit impulse signal');
xlabel('n');ylabel('u[n]'));
ramp=n.*(n>==0);
subplot(3,2,3);
stem(n,ramp);
title('ramp signal');
xlabel('n');ylabel('r[n]'));
a=0.8;
exp_sig=(a.^n).*(n>=0);
subplot(3,2,4);
stem(n,exp_signal);
title('exp signal');
xlabel('n');ylabel('a^[n]'));
omega=pi/4;
sinusoid=sin(omega*n);
subplot(3,2,5);
stem(n,sinusoid);
title ('sinusoidal signal');
xlabel('n');ylabel('sin(wn)');
To embed this project on your website, copy the following code and paste it into your website's HTML: