Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use MATLAB to generate N-128 evenly spaced points t between 0 and 2 and evaluate the function ft) = cos(41*t)+sin(15*t). Add a random component to
Use MATLAB to generate N-128 evenly spaced points t between 0 and 2 and evaluate the function ft) = cos(41*t)+sin(15*t). Add a random component to this function using the function randn. Use fft to generate a DFT of these values. (a) Plot the function f(t) before and after adding the random component, to make sure you are truly randomizing it. You should notice that the periodicity is not apparent anymore in the randomized version. However the power spectrum approach below will detect periodicity in the signal even if it is not obvious in the time domain. (b) Plot the power spectrum for the first 64 coefficients (i.e. the positive frequency spectrum). In the plot, assign values 0:63 to the x-axis. Now plot the full power spectrum. In the plot, assign values 0:127 to the x-axis. Mark the Nyquist frequency in the plot (can be drawn by hand and embedded as a photo/scan or indicated using your Word processor below the plot) (c) (d) Now use fftshift to create a plot of the full spectrum centered at zero. In the plot, assign values -64:63 to the x-axis
Step 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