spectralFlatness
Spectral flatness for signals and spectrograms
Syntax
Description
specifies options using one or more name-value arguments.flatness
= spectralFlatness(x
,f
,Name=Value
)
[
returns the spectral arithmetic mean and spectral geometric mean. You can specify an input
combination from any of the previous syntaxes.flatness
,arithmeticMean
,geometricMean
] = spectralFlatness(___)
spectralFlatness(___)
with no output arguments plots
the spectral flatness.
If the input is in the time domain, the spectral flatness is plotted against time.
If the input is in the frequency domain, the spectral flatness is plotted against frame number.
Examples
Input Arguments
Output Arguments
Algorithms
The spectral flatness is calculated as described in [1]:
where
sk is the spectral value at bin k.
b1 and b2 are the band edges, in bins, over which to calculate the spectral spread.
References
[1] Johnston, J. D. "Transform Coding of Audio Signals Using Perceptual Noise Criteria." IEEE Journal on Selected Areas in Communications. Vol. 6, Number 2, 1988, pp. 314–323.
Extended Capabilities
Version History
Introduced in R2019a