meanfreq
Mean frequency
Syntax
Description
estimates the mean normalized frequency, freq
= meanfreq(x
)freq
, of the power
spectrum of a time-domain signal, x
. To compute the power
spectrum, meanfreq
uses the periodogram
function with a
rectangular window and a number of DFT points equal to the length of
x
. If x
is a matrix, the function
computes the mean frequency of each column of x
independently.
specifies the frequency interval over which to compute the mean frequency. This
syntax can include any combination of input arguments from previous syntaxes, as
long as the second input argument is either freq
= meanfreq(___,freqrange
)fs
or
f
. If the second input is passed as empty, normalized
frequency will be assumed. The default value for freqrange
is the entire bandwidth of the input signal.
meanfreq(___)
with no output
arguments plots the PSD or power spectrum and annotates the mean frequency.
Examples
Input Arguments
Output Arguments
Algorithms
To determine the mean frequency, meanfreq
computes a
periodogram power spectrum estimate using a rectangular window.
You can obtain the same value of mean frequency, mFrq
, from a
signal x
at a sample rate fs
in these
three ways.
Directly from the signal |
mFrq = meanfreq(x,fs) |
From the periodogram of the signal |
[P,F] = periodogram(x,[],[],fs); mFrq = meanfreq(P,F) |
From the power spectral estimate (Welch's PSD) of the signal |
[P,F] = pwelch(x,rectwin(length(x)),[],[],fs); mFrq = meanfreq(P,F) |
Note
Because meanfreq
uses an intermediary representation
to transform the input signal from the time domain to frequency domain, the
returned mean frequency might vary, depending on the signal transformation
method, number of DFT points, and window size.
References
[1] Phinyomark, Angkoon, Sirinee Thongpanja, Huosheng Hu, Pornchai Phukpattaranont, and Chusak Limsakul. "The Usefulness of Mean and Median Frequencies in Electromyography Analysis." In Computational Intelligence in Electromyography Analysis – A Perspective on Current Applications and Future Challenges, edited by Ganesh R. Naik. London: IntechOpen, 2012. https://doi.org/10.5772/50639.
Extended Capabilities
Version History
Introduced in R2015aSee Also
findpeaks
| medfreq
| periodogram
| plomb
| pwelch