numPoints = 1000;
f = .10;
tau = 2;
t = linspace(0, 4*pi);
u = sin(2*pi*f*t);
g = exp(-t/tau);
out = conv(u, g, 'full');
subplot(3, 1, 1);
plot(t, u, 'b-', 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', 12);
ylabel('u', 'FontSize', 12);
subplot(3, 1, 2);
plot(t, g, 'b-', 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', 12);
ylabel('g', 'FontSize', 12);
subplot(3, 1, 3);
plot(out, 'b-', 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', 12);
ylabel('out', 'FontSize', 12);
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);
Best Answer