View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
IDpeak: Peak Identifier Function

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 581 KB File ID: #31894 Version: 1.1
image thumbnail

IDpeak: Peak Identifier Function


Tom O'Haver (view profile)


21 Jun 2011 (Updated )

Function to identify peaks in a signal based on a database of known peaks.

| Watch this File

File Information

Finds peaks in the signal "DataMatrix" (with x-values in column 1 and y-values in column 2), according to the peak detection parameters AmpT, SlopeT, sw, fw (see the "findpeaks" function below), then compares the found peak positions (maximum x-values) to a database of known peaks,in the form of an array of known peak maximum positions (Positions) and matching cell array of names (Names). If the position of a found peak in the signal is closer to one of the known peaks by less than the specified maximun error (maxerror), that peak is considered a match and its peak position, name, error, and amplitude are entered into the output cell array "IdentifiedPeaks". The full list of detected peaks, indentified or not, is returned in AllPeaks. Use "cell2mat" to access numeric elements of IdentifiedPeaks, e.g.cell2mat(IdentifiedPeaks(2,1)) returns the position of the first indentified peak, cell2mat(IdentifiedPeaks(2,2)) returns its name, etc. For testing purposes, the ZIP file includes an experimentally measured high-resolution atomic spectrum and a DataTable of peaks for Copper.
Version 1.1, June 23, 2011, by Tom O'Haver (


Peak Finding And Measurement inspired this file.

MATLAB release MATLAB 7.8 (R2009a)
Other requirements None
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
23 Jun 2011 Tom O'Haver

Tom O'Haver (view profile)

Version 1.1 corrects a bug that caused a "Warning: Single input behavior is obsolete..." message.

Comment only
21 Jun 2011 Tom O'Haver

Tom O'Haver (view profile)

No, the findpeaks function is my own function, and it is internal to Idpeaks. I do not have the Signal Processing Toolbox.

Comment only
21 Jun 2011 Mark Shore

Just wondering whether the findpeaks function referenced is the one in MATLAB's Signal Processing Toolbox, or another function with the same name from the FEX.

If the first, then the SPT should be listed as a required product.

Comment only
23 Jun 2011 1.1

Fixes bug that produced warning message.

Contact us