generate n random stable polynomials of order p with a minimum pole bandwidth of bw*fs where fs is the sampling fequency. To limit the pole radius to r set bw=-log(r)/pi bw may be a vector specifying a different max bandwidth for each row

- lpcrf2ar LPCRF2AR Convert reflection coefs to autoregressive coefs [AR,ARP,ARU,G]=(RF)

0001 function ar=lpcrand(p,n,bw) 0002 % generate n random stable polynomials of order p with a minimum pole 0003 % bandwidth of bw*fs where fs is the sampling fequency. 0004 % To limit the pole radius to r set bw=-log(r)/pi 0005 % bw may be a vector specifying a different max bandwidth for each row 0006 0007 % Copyright (C) Mike Brookes 1997 0008 % Version: $Id: lpcrand.m 713 2011-10-16 14:45:43Z dmb $ 0009 % 0010 % VOICEBOX is a MATLAB toolbox for speech processing. 0011 % Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html 0012 % 0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0014 % This program is free software; you can redistribute it and/or modify 0015 % it under the terms of the GNU General Public License as published by 0016 % the Free Software Foundation; either version 2 of the License, or 0017 % (at your option) any later version. 0018 % 0019 % This program is distributed in the hope that it will be useful, 0020 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0021 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0022 % GNU General Public License for more details. 0023 % 0024 % You can obtain a copy of the GNU General Public License from 0025 % http://www.gnu.org/copyleft/gpl.html or by writing to 0026 % Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA. 0027 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0028 0029 if nargin < 3 0030 bw=0; 0031 if nargin < 2 0032 n=1; 0033 end 0034 end 0035 if p 0036 if ~bw 0037 ar=lpcrf2ar(2*rand(n,p+1)-1); 0038 else 0039 k=exp(-pi*bw(:)*(0:p)); 0040 if size(k,1)==1 0041 ar=lpcrf2ar(2*rand(n,p+1)-1).*k(ones(n,1),:); 0042 else 0043 ar=lpcrf2ar(2*rand(n,p+1)-1).*k; 0044 end 0045 end 0046 else 0047 ar=ones(n,1); 0048 end

Generated on Fri 22-Sep-2017 19:37:38 by