From: beda meda on
Hi!
Could someone check my code for computing Mel cepstral coefficients? It gives me somehow "weird" coefficients, so I'm not sure it's right.

sig = double(sig);
%get frames
[lram, ~, Nram, frames] = DP_frameSig(sig, Fs, window_length, window_over);
%create bank of filters
[u, indexstart, indexstop] = DP_melBank(Fs, lram, Mstar);
cepsMel = zeros(M, Nram);
for l = 1:Nram
X = fft(frames(:, l));
sf = abs(X(1:lram/2));
ym = zeros(1, Mstar);
for i = 1:Mstar
for f = indexstart(i):indexstop(i)
ym(i) = ym(i) + sf(f)*u(i, f);
end
end
for j = 1:M
for i = 1:Mstar
cepsMel(j, l) = cepsMel(j, l) + log(ym(i))*cos((pi*j/Mstar)*(i - 0.5));
end
end
end

Thanks for anything!