Mercurial > hg > ishara
diff dsp/hz2mel.m @ 32:c3b0cd708782
Imported core dsp tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 13:48:47 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dsp/hz2mel.m Sun Jan 20 13:48:47 2013 +0000 @@ -0,0 +1,9 @@ +% hz2mel - Convert frequencies from Hertz to mel scale. +% +% hz2mel :: +% [[D]->nonneg] ~'any shape array of frequencies in Hz' +% -> [[D]->nonneg] ~'corresponding array of frequencies in mels'. +% +% Mel scale is approx linear below 700 Hz, and approx log above. +% Overall scaling fixed so that 1000 mel = 1000 Hz. +function m=hz2mel(f), m=2595*log10(1+f/700);