view dsp/cepstrum.m @ 36:9e7be347b3a0

Renamed sequence classes to avoid clashes with seq methods; Fixed default slicing dimension while retaining behaviour of window.m; Updated use of sequences in dsp/synth.
author samer
date Thu, 24 Jan 2013 14:51:23 +0000
parents c3b0cd708782
children
line wrap: on
line source
% cepstrum - generalised  cepstral coefficients from warped power spectrogram
%
% cepstrum ::
%    [[M]->[K]] ~'which coefficients to compute',
%    [[K]]      ~'edges for (K-2)-band filterbank',
%    [[N]]      ~'centre frequencies of spectrum bins',
%    [[N,T]]    ~'input spectra',
% -> [[M,T]]    ~'MFCCs for L time slices'.
function y = cepstrum(MX,edges,fx,x)
	melW = tri_filterbank(edges,fx);
	dctW = dct(eye(size(melW,1)));
	y = dctW(MX,:)*log(melW*x);
end