n = -10:10;
impulse = (n == 0); 
cosine = cos(0.5 * pi * n); 
exp_inc = exp(0.1 * n); 
exp_dec = exp(-0.1 * n); 

figure;
subplot(2,2,1); 
stem(n, impulse, 'r'); 
title('Impulse'); 
xlabel('n'); ylabel('Amplitude');

subplot(2,2,2); 
stem(n, cosine, 'g'); 
title('Cosine'); 
xlabel('n'); ylabel('Amplitude');

subplot(2,2,3); 
stem(n, exp_inc, 'b'); 
title('Exponential (Increasing)'); 
xlabel('n'); ylabel('Amplitude');

subplot(2,2,4); 
stem(n, exp_dec, 'm'); 
title('Exponential (Decreasing)'); 
xlabel('n'); ylabel('Amplitude');

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: