📄 imdct.m
字号:
function [f]=imdct(c,g,Ls)%IMDCT Inverse MDCT% Usage: f=imdct(c,g);% f=imdct(c,g,Ls);%% Input parameters:% c : M*N array of coefficients.% g : Window function.% Ls : Final length of function (optional)% Output parameters:% f : Input data%% IMDCT(c,g) computes an inverse MDCT with window g.% The number of channels is deduced from the size of the coefficient% array c.%% g must be whole-point even.%% IMDCT(f,g,Ls) does the same, but cuts or zero-extend the final% result to length Ls.%% SEE ALSO: MDCT, DGT, WILDUAL, WILORTH%% REFERENCES:% H. Bölcskei and F. Hlawatsch. Oversampled Wilson-type cosine modulated% filter banks with linear phase. In Asilomar Conf. on Signals, Systems, and% Computers, pages 998-1002, nov 1996.% % H. S. Malvar. Signal Processing with Lapped Transforms. Artech House% Publishers, 1992.% % J. P. Princen and A. B. Bradley. Analysis/synthesis filter bank design based% on time domain aliasing cancellation. IEEE Transactions on Acoustics,% Speech, and Signal Processing, ASSP-34(5):1153-1161, 1986.% % J. P. Princen, A. W. Johnson, and A. B. Bradley. Subband/transform coding% using filter bank designs based on time domain aliasing cancellation.% Proceedings - ICASSP, IEEE International Conference on Acoustics, Speech and% Signal Processing, pages 2161-2164, 1987.% Author : Peter Soendergaard.error(nargchk(2,3,nargin));if size(g,2)>1 if size(g,1)>1 error('g must be a vector'); else % g was a row vector. g=g(:); end;end;% If input is real, and window is real, output must be real as well.inputwasreal = (isreal(g) && isreal(c));Lwindow=size(g,1);wasrow=0;M=size(c,1);N=size(c,2);W=size(c,3);L=M*N;Lwindow=size(g,1);% Length of window must be dividable by M.if rem(Lwindow,M)~=0 error('Length of window must be dividable by M.')end;% Call computational subroutine.a=M;c=comp_idwiltiii(reshape(c,M*N,W),a,M);f=comp_igdgt(c,g,a,2*M,L,0,.5,0,0);% Check if Ls was specified.if nargin==3 f=postpad(f,Ls);else Ls=L;end;f=comp_sigreshape_post(f,Ls,wasrow,[0; W]);% Clean signal if it is known to be realif inputwasreal f=real(f);end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -