LPCPF2RR convert power spectrum to autocorrelation coefs RR=(PF,P) Note that these will only be accurate if the power spectrum is much longer than p

- irfft IRFFT Inverse fft of a conjugate symmetric spectrum X=(Y,N,D)

0001 function rr=lpcpf2rr(pf,p) 0002 %LPCPF2RR convert power spectrum to autocorrelation coefs RR=(PF,P) 0003 % Note that these will only be accurate if the power spectrum is much longer than p 0004 0005 0006 % Copyright (C) Mike Brookes 1997 0007 % Version: $Id: lpcpf2rr.m 2460 2012-10-29 22:20:45Z dmb $ 0008 % 0009 % VOICEBOX is a MATLAB toolbox for speech processing. 0010 % Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html 0011 % 0012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0013 % This program is free software; you can redistribute it and/or modify 0014 % it under the terms of the GNU General Public License as published by 0015 % the Free Software Foundation; either version 2 of the License, or 0016 % (at your option) any later version. 0017 % 0018 % This program is distributed in the hope that it will be useful, 0019 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0020 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0021 % GNU General Public License for more details. 0022 % 0023 % You can obtain a copy of the GNU General Public License from 0024 % http://www.gnu.org/copyleft/gpl.html or by writing to 0025 % Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA. 0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0027 0028 [nf,p2]=size(pf); 0029 if nargin<2 p=p2-2; end; 0030 ir=irfft(pf,[],2); 0031 if p>p2-2 0032 rr=[ir(:,1:p2-1) zeros(nf,p+2-p2)]; 0033 else 0034 rr=ir(:,1:p+1); 0035 end

Generated on Tue 10-Oct-2017 08:30:10 by