# spectralSlope

Spectral slope for audio signals and auditory spectrograms

## Description

specifies options using one or more name-value arguments.`slope`

= spectralSlope(`x`

,`f`

,`Name=Value`

)

`spectralSlope(___)`

with no output arguments plots the
spectral slope. You can specify an input combination from any of the previous syntaxes.

If the input is in the time domain, the spectral slope is plotted against time.

If the input is in the frequency domain, the spectral slope is plotted against frame number.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

The spectral slope is calculated as described in [1]:

$$\text{slope}=\frac{{\displaystyle \sum _{k={b}_{1}}^{{b}_{2}}\left({f}_{k}-{\mu}_{f}\right)\left({s}_{k}-{\mu}_{S}\right)}}{{\displaystyle \sum _{k={b}_{1}}^{{b}_{2}}{\left({f}_{k}-{\mu}_{f}\right)}^{2}}}$$

where

*f*is the frequency in Hz corresponding to bin_{k}*k*.*μ*is the mean frequency._{f}*s*is the spectral value at bin_{k}*k*.*μ*is the mean spectral value._{s}*b*_{1}and*b*_{2}are the band edges, in bins, over which to calculate the spectral slope.

## References

[1] Lerch, Alexander. *An
Introduction to Audio Content Analysis Applications in Signal Processing and Music
Informatics*. Piscataway, NJ: IEEE Press, 2012.

## Extended Capabilities

## Version History

**Introduced in R2019a**