Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) For your study construct a discrete time distribution. array y(t) using the function y(t) = sin( 2.T f t) with period T =
1) For your study construct a discrete time distribution. array y(t) using the function y(t) = sin( 2.T f t) with period T = 5 samples. For the discretization use a range of 1000 time samples. Make a plot of function y(t) versus time t. 2) Write your own discrete Fourier transform user function using the matrix-vector multiplication method that inputs the discretized time distribution array y(t) and outputs the discretized frequency distribution array Y(f). Make a plot of Y(f) versus f for frequencies of 0 to 0.5 cycles per sample (i.e., the Nyquist limit). You can use the scipy function fftfreq() to obtain the frequency scale. 3) Use the scipy function fft() to compute the frequency distribution Y(f) from the time distribution y(t). Check you results for Y(f) from your user DFT code and the scipy FFT code agree. 4) Use the python command line module %timeit to compare the execution time for your DFT() code and scipy's FFT() code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Python Code python import numpy as np import matplotlibpyplot as plt from scipyfft import fft fftfre...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started