1 function [a,efinal] = rc2poly(RC,E);
2 % converts reflection coefficients into an AR-polynomial
3 % [a,efinal] = rc2poly(K)
5 % see also ACOVF ACORF AR2RC RC2AR DURLEV AC2POLY, POLY2RC, RC2POLY, RC2AC, AC2RC, POLY2AC
8 % $Id: rc2poly.m 9609 2012-02-10 10:18:00Z schloegl $
9 % Copyright (C) 1998-2002,2008,2012 by Alois Schloegl <alois.schloegl@ist.ac.at>
10 % This is part of the TSA-toolbox. See also
11 % http://pub.ist.ac.at/~schloegl/matlab/tsa/
12 % http://octave.sourceforge.net/
13 % http://biosig.sourceforge.net/
15 % This program is free software: you can redistribute it and/or modify
16 % it under the terms of the GNU General Public License as published by
17 % the Free Software Foundation, either version 3 of the License, or
18 % (at your option) any later version.
20 % This program is distributed in the hope that it will be useful,
21 % but WITHOUT ANY WARRANTY; without even the implied warranty of
22 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 % GNU General Public License for more details.
25 % You should have received a copy of the GNU General Public License
26 % along with this program. If not, see <http://www.gnu.org/licenses/>.
29 if nargout>1 && nargin<2
30 fprintf('Zero-lag autocorrelation, R0 not specified\n')
36 fprintf(2,'Error %s: "K" must be a vector\n',mfilename);
40 if ~exist('rc2ar','file')
41 fprintf(2,'Error %s: RC2AR.M not found. \n Download TSA toolbox from http://www.dpmi.tu-graz.ac.at/~schloegl/matlab/tsa/\n',mfilename);
45 [AR,RC,PE] = rc2ar(RC(:).');
48 efinal=PE(length(PE))/PE(1);