# spectrogram

Spectrogram using short-time Fourier transform

## Syntax

## Description

`[___,`

also
returns a matrix, `ps`

] = spectrogram(___)`ps`

, containing an estimate
of the power spectral density (PSD) or the power spectrum of each
segment.

`[___] = spectrogram(___,'reassigned')`

reassigns
each PSD or power spectrum estimate to the location of its center
of energy. If your signal contains well-localized temporal or spectral
components, then this option generates a sharper spectrogram.

`[___] = spectrogram(___,`

returns
the PSD or power spectrum estimate over the frequency range specified
by `freqrange`

)`freqrange`

. Valid options for `freqrange`

are `'onesided'`

, `'twosided'`

,
and `'centered'`

.

`[___] = spectrogram(___,`

specifies additional options using name-value pair arguments. Options include
the minimum threshold and output time dimension.`Name,Value`

)

`[___] = spectrogram(___,`

returns PSD estimates if `spectrumtype`

)`spectrumtype`

is specified as
`'psd'`

and returns power spectrum estimates if
`spectrumtype`

is specified as
`'power'`

.

## Examples

## Input Arguments

## Output Arguments

## Tips

If a short-time Fourier transform has zeros, its conversion
to decibels results in negative infinities that cannot be plotted.
To avoid this potential difficulty, `spectrogram`

adds `eps`

to
the short-time Fourier transform when you call it with no output arguments.

## References

[1] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. *Discrete-Time
Signal Processing*. 2nd Ed. Upper Saddle River, NJ: Prentice
Hall, 1999.

[2] Rabiner, Lawrence R., and Ronald W. Schafer. *Digital
Processing of Speech Signals*. Englewood Cliffs, NJ: Prentice-Hall,
1978.

[3] Chassande-Motin, Éric, François Auger, and
Patrick Flandrin. “Reassignment.” In *Time-Frequency
Analysis: Concepts and Methods*. Edited by Franz Hlawatsch
and François Auger. London: ISTE/John Wiley and Sons, 2008.

[4] Fulop, Sean A., and Kelly Fitz. “Algorithms for
computing the time-corrected instantaneous frequency (reassigned)
spectrogram, with applications.” *Journal of the
Acoustical Society of America*. Vol. 119,
January 2006, pp. 360–371.

## Extended Capabilities

**Introduced before R2006a**