⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lpcsynth.m

📁 非常好的数字处理教程
💻 M
字号:
function d = lpcsynth(a,g,e,h)% d = lpcsynth(a,g,e,h)   Resynthesize from LPC representation%    Each row of a is an LPC fit to a h-point (non-overlapping) %    frame of data.  g gives the overall gains for each frame and %    e is an excitation signal (if e is empty, white noise is used; %    if e is a scalar, a pulse train is used with that period).%    Return d as the resulting LPC resynthesis.% 2001-02-25 dpwe@ee.columbia.eduif nargin < 3  e = [];endif nargin < 4  h = 128;end[nhops,p] = size(a);npts = nhops*h;if length(e) == 0  e = randn(1,npts);elseif length(e) == 1  pd = e;  e = sqrt(pd) * (rem(1:npts,pd) == 0);else	if (length(e) < npts)		ptsdif = npts - length(e);		while (ptsdif > 0)			e = repmat(e,2,1);			ptsdif = npts - length(e);		end	endendd = 0*e;for hop = 1:nhops  hbase = (hop-1)*h;  aa = a(hop,:);  G = g(hop);  newbit = G*filter(1, aa, e(hbase + [1:h]));  d(hbase + [1:h]) = newbit;end% De-emphasis (must match pre-emphasis in lpcfit)pre = [1 -0.9];d = filter(1,pre,d);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -