outsig = setdbspl(insig,lvl); outsig = setdbspl(insig,lvl,'ac');
setdbspl(insig,lvl) sets the SPL (sound pressure level) of the signal insig to lvl dB, using the convention that a pure tone with an RMS value of 1 corresponds to 100 dB SPL.
setdbspl(lvl) returns a scaling constant that will scale a signal with RMS value of 1 to the correct level.
If the input is a matrix, it is assumed that each column is a signal.
setdbspl(insig,lvl,'ac') does the same, but considers only the AC component of the signal (i.e. the mean is removed).
B. C. J. Moore. An Introduction to the Psychology of Hearing. Academic Press, 5th edition, 2003.