Cepstrum In MATLAB

Viewed 213

I have tried and there is not proper function in MATLAB to calculate cepstrum.

By using commercial software and processing file 21.wav it is possible to get this result:

Cepstrum from commercial software

How can I achieve the same results with MATLAB code? When I use the cceps or rceps functions in MATLAB, the result is not even close:

%% Complex cepstral analysis
% Load Signal
A = importdata ('21.txt');
M = A(:,2);
Fs = 1552;
t = (0:length(M)-1)/Fs;
c = cceps(M);
plot(t,c)
xlabel('Time (s)')
title('Complex cepstrum')
ylim([0 0.2]);
xlim([0 4.6]);

The result is:

Complex cepstrum

%% Real cepstrum
% Load Signal
A = importdata ('21.txt');
M = A(:,2);
Fs = 1552;
t = (0:length(M)-1)/Fs;
c = rceps(M);
plot(t,c)
xlabel('Time (s)')
title('Real cepstrum')
ylim([0 0.2]);
xlim([0 4.6]);

The result is:

Real cepstrum

1 Answers

add x and y limit to your code and then compare the result

ylim([0 0.18]);
xlim([0 4.6]);
Related