Home > voicebox > lpcar2ra.m

lpcar2ra

PURPOSE

LPCAR2RA Convert ar filter to inverse filter autocorrelation coefs. RA=(AR)

SYNOPSIS

function ra=lpcar2ra(ar)

DESCRIPTION

`LPCAR2RA Convert ar filter to inverse filter autocorrelation coefs. RA=(AR)`

CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:
• distchar DISTCHAR calculates the cosh spectral distance between AR coefficients D=(AR1,AR2,MODE)
• distisar DISTISAR calculates the Itakura-Saito distance between AR coefficients D=(AR1,AR2,MODE)
• distitar DISTITAR calculates the Itakura distance between AR coefficients D=(AR1,AR2,MODE)
• meansqtf AVEPSPEC calculates the mean square transfer function for a filter D=(B,A)

SOURCE CODE

```0001 function ra=lpcar2ra(ar)
0002 %LPCAR2RA Convert ar filter to inverse filter autocorrelation coefs. RA=(AR)
0003
0004
0005 %      Copyright (C) Mike Brookes 1997
0006 %      Version: \$Id: lpcar2ra.m 713 2011-10-16 14:45:43Z dmb \$
0007 %
0008 %   VOICEBOX is a MATLAB toolbox for speech processing.
0010 %
0011 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0012 %   This program is free software; you can redistribute it and/or modify
0014 %   the Free Software Foundation; either version 2 of the License, or
0015 %   (at your option) any later version.
0016 %
0017 %   This program is distributed in the hope that it will be useful,
0018 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0019 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0020 %   GNU General Public License for more details.
0021 %
0022 %   You can obtain a copy of the GNU General Public License from
0023 %   http://www.gnu.org/copyleft/gpl.html or by writing to
0024 %   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
0025 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0026
0027 [nf,p1]=size(ar);
0028 ra=zeros(nf,p1);
0029 for i=1:p1
0030    ra(:,i)=sum(ar(:,1:p1+1-i).*ar(:,i:p1),2);
0031 end
0032```

Generated on Mon 06-Aug-2018 14:48:32 by m2html © 2003