function A=cps2a(C,P); % Conversion of LPC cepstra to LPC coefficints (not very optimized...) % % Syntax: A=cps2a(C) % or A=cps2a(C,P) % % C is the matrix with vector of LPCC coefficients (without c0) in each % column: [c(1) c(2) ... c(NBC)]' % P is the desired number of LPCC coefficients without a0. (default NBC) % P can not be > NBC % A is matrix with a vector of P+1 LPC coefficients in each column (including % a0=1): [1 a(1) a(2) ... a(P)]' [NBC,Nram] = size(C); if nargin==1, P=NBC; end % alloc for A A = zeros(P+1,NBC); A(:,1) = 1; % the cycle for ii=1:Nram, c = [0; C(:,ii)]; % the vector completed with zero so that we % can use the code from prev function. a=zeros(P+1,1); a(1)=1; for n=1:P, som=0; for k=1:n-1 som=som+k/n*c(k+1)*a(n-k+1); end % end de for k a(n+1)=-c(n+1)-som; end A(:,ii) = a; end