IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
peak_closest.m File Reference

Detailed Description

Returns index of peak closest to a.

See also
db_peaks.m

Definition in file peak_closest.m.

Go to the source code of this file.

Functions

function peak_closest (in db, in a)
 

Function Documentation

function peak_closest ( in  db,
in  a 
)
Parameters
dbData structure obtained from db_peaks.m
acan be either the index of a wavenumber or the wavenumber itself, because it is easy to distinguish one from the other
Returns
result is an index of an element in db, such as db.names(result), db.centres(result) of db.indexes(result)