How is pspectrum() different from FFT() magnitude plotted in dB?
Show older comments
I am having difficulty in finding a high-resolution frequency spectrum even though I have a pretty large number of time domain data samples (1999999 data points). The fundamental frequency peak in FFT is with a resolution of 50 Hz when I use fft(). I had also put this post here with the screenshots, code, and data.
I am thinking of using pspectrum() or zoomFFT(). The latter seems to be more relevant to me. But after creating the object of dsp.zoomFFT(), I am not sure how to proceed because z = zfft(data(:,2)) gives me error of
Fs = 40e3;
CF = 4e3;
BW = 1e3;
D = Fs/BW;
fftlen = 64;
L = D * fftlen;
zfft = dsp.ZoomFFT(D,CF,Fs,'FFTLength',fftlen);
z = zfft(data(:,2));
The number of rows in the input signal must be a multiple of 48 (the decimation factor).
Error in plot_fft_v8 (line 124)
Also, I am thnking that probably pspectrum() can help because
pspectrum(xTable,'FrequencyResolution',10)
Error using pspectrum>validateFrequencyResolution (line 1005)
'FrequencyResolution' value is not achievable for the specified parameters. 'FrequencyResolution' value must
be within [8.1702e-07, 1.634] (*pi radians/sample).
Error in pspectrum>parseAndValidateInputs (line 811)
validateFrequencyResolution(opts.FrequencyResolution, opts.Leakage,...
Error in pspectrum (line 246)
opts = parseAndValidateInputs(x,varargin);
can set my frequency resolution.

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!