samer@32: % hz2mel - Convert frequencies from Hertz to mel scale. samer@32: % samer@32: % hz2mel :: samer@32: % [[D]->nonneg] ~'any shape array of frequencies in Hz' samer@32: % -> [[D]->nonneg] ~'corresponding array of frequencies in mels'. samer@32: % samer@32: % Mel scale is approx linear below 700 Hz, and approx log above. samer@32: % Overall scaling fixed so that 1000 mel = 1000 Hz. samer@32: function m=hz2mel(f), m=2595*log10(1+f/700);