Professional Documents
Culture Documents
clc;
close all;
clear all;
% Plotting x(t)
t = 0:0.001:30;
x = exp(-5*t);
y2 = zeros(size(x));
y2 = y2(2:end);
x = [y2, x];
t = -30:0.001:30;
subplot(4, 1, 1)
plot(t, x);
title('x(t)=exp(-5t)*u(t)')
clc;
close all;
clear all;
% Plotting x(t)
t = 0:0.001:30;
x = exp(-5*t);
t = -30:0.001:30;
x2 = fliplr(x);
x = [x2(1:end-1),x];
subplot(4, 1, 1);
plot(t, x);
title('x(t)=exp(-5|t|)')
%Plotting x(t)
subplot(3, 1, 1)
t = -10:0.001:10;
sig = zeros(size(t));
i = 1;
for ti=t
sig(i) = signal(ti);
i = i + 1;
end
plot(t, sig)
title('x(t)')
ylim([0 1.25])
clc;
clear all;
close all;
%Plotting x(t)
subplot(2, 1, 1)
t = -10:0.001:10;
sig = zeros(size(t));
i = 1;
for ti=t
sig(i) = signal(ti);
i = i + 1;
end
plot(t, sig)
line(xlim, [0,0], 'Color', 'k');
title('x(t)')