diff dsp/melspace.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/melspace.m	Sun Jan 20 13:48:47 2013 +0000
@@ -0,0 +1,12 @@
+% melspace - create array of frequencies evenly spaced in mel scale
+%
+% melspace ::
+%    nonneg    ~'lower frequency limit in Hz',
+%    nonneg    ~'upper frequency limit in Hz',
+%    N:natural ~'number of frequency steps'
+% -> [[1,N+1]->nonneg] ~'frequencies in Hz'.
+
+function f=melspace(lowf,highf,N)
+	limits=hz2mel([lowf,highf]);
+	f=mel2hz(linspace(limits(1),limits(2),N));
+end