How do i get the Nyquist frequency from FFT and PSD?
Show older comments
Here is the code I was provided. I am unsure how to get the Nyquist frequency from the plot.
h_11 = 0.4*sinc(0.4*[-5:5]);
Npt=512;
fft_h_11 = fft(h_11,Npt); %FFT of filter
psd_h_11 = fft_h_11 .* conj(fft_h_11); %PSD of filter
psd_h_11_dB = 10*log10(psd_h_11); %PSD in dB
h_41 = 0.4*sinc(0.4*[-20:20]); %Impulse response, N=41
fft_h_41 = fft(h_41,Npt); %FFT of filter
psd_h_41 = fft_h_41 .* conj(fft_h_41); %PSD of filter
psd_h_41_dB = 10*log10(psd_h_41); %PSD in dB
omega = [1:Npt]*20/Npt; %frequency axis
subplot(2,1,1) %create an array of plots, 2 by 1
plot(omega,psd_h_11,omega,psd_h_41) %plot linear-scaled PSD
legend('10th order', '40th order')
title('Example 9-1 Linear Scale')
subplot(2,1,2) %Activate lower plot
plot(omega,psd_h_11_dB,omega,psd_h_41_dB) %plot logarithmic-scaled PSD
legend('10th order', '40th order')
title('Example 9-1 Logarithmic Scale')
Accepted Answer
More Answers (0)
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!