b) Create the magnitude plot and phase plot of the spectra (Fourier Transform) for t = 5, 10, 25 [seconds]. In other words, overlap three magnitude curves for t = 5, 10, 25 in one plot; and overlap three phase curves for t = 5, 10, 25 in the other plot.
b) Create the magnitude plot and phase plot of the spectra (Fourier Transform) for t = 5, 10, 25 [seconds]. In other words, overlap three magnitude curves for t = 5, 10, 25 in one plot; and overlap three phase curves for t = 5, 10, 25 in the other plot.
Chapter8: Data And Network Communication Technology
Section: Chapter Questions
Problem 7VE
Related questions
Question
please help. here is my code but my professor said" it was not intended to start with the sinc function to generate the plots. Should define the rectangular pulse in the time domain and then perform the fft on that." Please fix my code:
close all;
clear;
% Frequency range and increment for graph
f = -0.3:0.001:0.3;
% Establishing values for Tau and Fourier Transform functions
T1 = 5;
x1 = pi * f * T1;
M1 = (T1 * sin(x1)) ./ x1;
T2 = 10;
x2 = pi * f * T2;
M2 = (T2 * sin(x2)) ./ x2;
T3 = 25;
x3 = pi * f * T3;
M3 = (T3 * sin(x3)) ./ x3;
M1(isnan(M1)) = T1;
M2(isnan(M2)) = T2;
M3(isnan(M3)) = T3;
% Perform FFT and FFT shift for each signal
F1 = fftshift(fft(M1));
F2 = fftshift(fft(M2));
F3 = fftshift(fft(M3));
% Plot magnitude of the signals
figure(1)
plot(f, abs(M1), 'c', f, abs(M2), 'b', f, abs(M3), 'm');
xlabel('Frequency (Hz)');
ylabel('|x(f)|');
title('Magnitude Plot of Fourier Transform of x(t)');
% Plot phase using FFT and FFT shift
figure(2)
plot(f, rad2deg(angle(F1)), 'c', ...
f, rad2deg(angle(F2)), 'b', ...
f, rad2deg(angle(F3)), 'm');
xlabel('Frequency (Hz)');
ylabel('Phase (degrees)');
title('Phase Plot after FFT and FFT Shift');
Thank you I will like
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning