I have a problem Problem understanding SPTool
2 次查看(过去 30 天)
显示 更早的评论
I have two questions about use of the Spectrum Viewer:
1. The displayed frequency in the Spectrum viewer window [0,fs/2] gives me an apparent range from 0 to 256 Hz when I use a sampling rate of 512 Hz. But I am only interested in the frequency range from 0 to 50 Hz. Do not see how to manage that x-axis range.
That leads me to want to Export data that goes into the spectrum.
2. When I Export Spect2[auto] to the workspace I get two variables that appear to contain spectral data: contained in the Spect2 structure are arrays for p and f. I can't fined any array that looks like the PSD seen on the Spectrum Viewer. Also: how can In interpret what I get from a plot of the arrant p in the workspace?
Helpful comments will be GREATLY appreciated.
Many thanks in advance
Don
0 个评论
采纳的回答
Wayne King
2012-7-4
Hi Don, Yes by default it gives you the spectrum from 0 to Fs/2 (the Nyquist frequency). You can use Mouse Zoom (under Options) to zoom in on the interval from 0 to 50 Hz if you wish.
The structure array that is exported to the workspace contains all the information you need. The reason it looks different is that it gives you the power spectrum from -Nyquist to Nyquist. If you just plot
plot(f,10*log10(P))
For the range of frequencies from 0 to Nyquist, you'll get the exact result.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!