medfreq
Median frequency of a signal spectrum.
📝Syntax
Fmed = medfreq(X)
Fmed = medfreq(X, Fs)
Fmed = medfreq(Pxx, F)
[Fmed, P] = medfreq(...)
📥Input Arguments
Parameter Description
X input time-domain signal.
Fs sample rate.
Pxx, F power spectral density estimate and matching frequency vector.
📤Output Arguments
Parameter Description
Fmed frequency dividing the spectral power into two equal parts.
P power used for the measurement.
📄Description

medfreq computes the median frequency with rectangular spectral integration and linear interpolation between bin borders.

💡Examples
[f, p] = medfreq(sin((0:127)' * 0.1), 10);
🔗See Also
meanfreqbandpower
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub