function logS = cepsval(w,c);

%cepsval        Computes the log of the spectral envelope from a cepstrum model
%               logS = cepsval(omega,c);
%               omega   Radian freqs. where the envelope is evaluated
%               c       Cepstrum coefficients
%
%_______________________________________________________________________
%For more information about this mfile please take a look at the paper
%"Estimation of the spectral envelope of voiced sounds using a penalized
%likelihood approach" by Marine Oudot, Olivier Cappé and Eric Moulines.

% Author : Olivier Cappé, 1994 - 2000
% ENST Dpt. TSI / LTCI (CNRS URA 820), Paris

logS = c(1)*ones(size(w));

for i=2:length(c)
  logS = logS + 2*c(i)*cos((i-1)*w);
end;
