Just answer number 2, I will upload the answer of question 1 for
reference only. Please show all steps, mathlab code and plots.
1. Create the following operations in MATLAB to create signals
over time (plot them):
a. π
πππ‘(π‘/40) β π β5π‘
b. π’(π‘) β π β10π‘
c. πΆππ (100ππ‘)
d. πΆππ (1000 ππ‘) β π β25|π‘|
2. Find the Fourier transform for the signals of point 1 and
plot them. Are the computed transforms the same as those proposed
in the theory? Analyze and conclude.
CODE :
clc; clear all; close all;
t1 = -1:0.001:1; %time
x1 = rectangularPulse(t1/40).*exp(-5*t1); %(a)
x2 = exp(-10*t1).*(t1>=0); %(b)
t2 = -0.1:0.001:0.1; %change time rang for (c) & (d)
x3 = cos(100*pi*t2); %(c)
x4 = cos(1000*pi*t2).*exp(-25*abs(t2)); %(d)
plot(t1,x1,'b'); %plot x1(t) for (a)
xlabel("t ->"); %label x-axis
ylabel("x_1(t)"); %label y-axis
title("(a)"); %title
grid on; %grid on
figure; %creating new figure
plot(t1,x2,'b'); %plot x2(t) for (b)
xlabel("t ->");
ylabel("x_2(t)");
title("(b)");
grid on;
figure;
plot(t2,x3,'b'); %plot x3(t) for (c)
xlabel("t ->");
ylabel("x_3(t)");
title("(c)");
grid on;
figure;
plot(t2,x4); %plot x4(t) for (d)
xlabel("t ->");
ylabel("x_4(t)");
title("(d)");
grid on;
Just answer number 2, I will upload the answer of question 1 for reference only. Please show all steps, mathlab code and
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am