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!