Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Signals and systems. It is a computer exercise; please solve it by using MATLAB and explain each step in the problem. Thanks in advance! 1
Signals and systems. It is a computer exercise; please solve it by using MATLAB and explain each step in the problem.
Thanks in advance!
1 The Discrete Fourier Transform 1.1 Implementation Implement the function [ak]=myDFT(x) that calculates the discrete Fourier transform (also known as Fourier series for discrete signals) of the signal r[n] which is stored in the vector x that has the length N. Let's assume that xnl is periodic with the period N and that the vector x stores one period 1.2 Testing Generate two signals. A sine wave xn-sin to test your implementation [ak]=myDFT (x) n) and a box signal boxsignal . Justify your choice of N (for the sine wave) and your choice of N1 and N2 (for the box signal, see CE 1, part 2.) . Is the outcome ak what you expected? Compare this outcome to what you get from the inbuilt fft in Matlab (or numPy Remember that the coefficients ak are complex numbers so you need to use real() and imag() or (more interesting) abs) and angle () to compare the coefficientsStep by Step Solution
There are 3 Steps involved in it
Step: 1
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