# how to set RBW while using medfreq ?

6 vues (au cours des 30 derniers jours)
LO le 7 Mai 2019
Modifié(e) : LO le 7 Mai 2019
Is there a mathematical/precise way to calculate an optimal rbw (resolution bandwidth) while using the command medfreq to calculate the frequency of a signal (sinewave in my case) in matlab?
the tutorial of the function just indicates:
"Resolution bandwidth, specified as a positive scalar. The resolution bandwidth is the product of two values: the frequency resolution of the discrete Fourier transform and the equivalent noise bandwidth of the window used to compute the PSD."
so the first one is Fs / Nfft (with Fs = sampling freq and Nfft the number of data points per each analysis window of the fft).
I am having some doubts about the other parameter, i.e. the noise bandwidth
is this formula correct ?
example (hanning window, 1024 samples)
Fs = 20000 Hz
Nfft = 2^10 = 1024
bw = enbw(hanning(Nfft)) = 1.4985
RBW = (Fs/Nfft)/bw
If I use this formula I estimate an RBW of 13 Hz ca. MATLAB gives me an error saying that the minimum valule expected as RBW is 19.something Hz.. Any idea of why ?
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Spectral Measurements dans Help Center et File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by