clc;
clear;
close all;

function u = unitStep(n)
     u = n >= 0;
end;

function s = SinC(n)
    s = sin(n)./(n);
    s(n == 0) = 1;
end

n = -10:.5:10;
y = unitStep(n) + SinC(n);
subplot(3,1,1);
stem(n,y,"filled");
title("Adding two time signals");
xlabel("n");
ylabel("Amplitude");
grid on;
axis([-11 11 -2.5 2.5]);

y = unitStep(n) - SinC(n);
subplot(3,1,2);
stem(n,y,"filled");
title("Subtracting two time signals");
xlabel("n");
ylabel("Amplitude");
grid on;
axis([-11 11 -2.5 2.5]);

y = unitStep(n) .* SinC(n);
subplot(3,1,3);
stem(n,y,"filled");
title("Multiplying two time signals");
xlabel("n");
ylabel("Amplitude");
grid on;
axis([-11 11 -2.5 2.5])

Embed on website

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