Compute the power spectrum of a multichannel sinusoidal signal using the dsp.SpectrumEstimator System object™. You can get the vector of frequencies at which the spectrum is estimated using the getFrequencyVector function. To compute the resolution bandwidth of the estimate (RBW), use the getRBW function.
Generate a three-channel sinusoid sampled at 1 kHz. Specify sinusoidal frequencies of 100, 200, and 300 Hz. The second and third channels have their phases offset from the first by and , respectively.
Estimate and plot the one-sided spectrum of the signal. Use the dsp.SpectrumEstimator object for the computation and the dsp.ArrayPlot for the plotting.
Spectrum frequencies, returned as a column vector.
The length of the frequency vector is determined by
the FrequencyRange and the FFT length.
If you set the FrequencyRange
to 'onesided' and the FFT length, NFFT, is even,
the frequency vector is of length NFFT/2+1, and covers the interval
[0,SampleRate/2].
If you set the FrequencyRange
to 'onesided' and NFFT is odd, the frequency
vector is of length (NFFT+1)/2 and covers the interval
[0,SampleRate/2].
If you set the FrequencyRange
to 'twosided', the frequency vector is of length
NFFT and covers the interval [0, SampleRate].
If you set the FrequencyRange
to 'centered', the frequency vector is of length
NFFT and covers the range [-SampleRate/2,
SampleRate/2] and [-SampleRate/2, SampleRate/2] for even
and odd length NFFT, respectively.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.