4.5

4.5 | 2 ratings Rate this file 50 downloads (last 30 days) File Size: 384.47 KB File ID: #24321

PlotSpectrogram

by Peter Kabal

 

01 Jun 2009 (Updated 19 Jun 2009)

Code covered by the BSD License  

This program plots spectrograms (intensities versus frequencies, plotted against time).

Download Now | Watch this File

File Information
Description

This program plots spectrograms (vertical slices of intensities versus frequencies, with slices plotted against time). PlotSpectrogram is designed for ease of use.
Features:
• Intensities are in log units, with the dynamic range limited (80 dB by default). This strategy avoids the problem of low level portions of the spectrogram expanding the dynamic range and thereby obscuring the detail of the energetic portions.
• The intensities are calculated as absolute units of dBov (decibels relative to overload).
• The time-frequency resolution of the spectrogram can be controlled. The bandwidth resolution of the spectrogram can be directly specified. The default is a narrowband spectrogram. Optionally, the analysis window can be specified in terms of coefficients, bandwidth, or length.
• The frequency transform properly takes into account the time-aliasing when analyzing long windows (corresponding to small bandwidths).
• The number of spectrogram slices can be specified (default 500).
• The number of frequency points can be specified (default is to automatically choose either 513 or 1025 values, depending on the window length).
• An optional pre-emphasis can be applied to better show the high frequency intensities.
• All windows are centered at their respective time points. This means that the windows at the end points of the time interval will include samples on both sides of the end points.
• A subset of frequencies can be plotted to give an expanded view.
• The default plot uses a gray-scale (dark is more intense). The spectrogram can optionally be colorized using the SpecColorMap (included). This mapping adds color (pale yellow through red going to black) but also reproduces properly in gray-level when photocopied.

MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files license.txt,
Spectrogram/Documentation/PlotSpectrogram.pdf,
Spectrogram/Documentation/PlotSpectrogram.png,
Spectrogram/PlotSpectrogram.m,
Spectrogram/private/PSDecodeOptions.m,
Spectrogram/private/SpecSlices.m,
Spectrogram/SpecColorMap.m,
Spectrogram/test/addf8.wav,
Spectrogram/test/tPlotSpectrogram.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
22 Oct 2009 Jan

Very nice.

11 Nov 2009 Erdal Bizkevelci  
Please login to add a comment or rating.
Updates
19 Jun 2009

Update to BSD License - no files changed

Tag Activity for this File
Tag Applied By Date/Time
spectrogram Peter Kabal 01 Jun 2009 15:23:20
speech Peter Kabal 01 Jun 2009 15:23:22
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com