function a = idct(b,n) %IDCT Inverse discrete cosine transform. % % X = IDCT(Y) inverts the DCT transform, returning the % original vector if Y was obtained using Y = DCT(X). % % X = IDCT(Y,N) pads or truncates the vector Y to length N % before transforming. % % If Y is a matrix, the IDCT operation is applied to % each column. % % See also FFT, IFFT, DCT. % Author(s): C. Thompson, 2-12-93 % S. Eddins, 10-26-94, revised % Copyright 1988-2004 The MathWorks, Inc. % $Revision: 1.7.4.2 $ $Date: 2004/12/26 22:16:04 $ % References: % 1) A. K. Jain, "Fundamentals of Digital Image % Processing", pp. 150-153. % 2) Wallace, "The JPEG Still Picture Compression Standard", % Communications of the ACM, April 1991. if nargin == 0, error('Not enough input arguments.'); end if isempty(b), a = []; return end % If input is a vector, make it a column: do_trans = (size(b,1) == 1); if do_trans, b = b(:); end if nargin==1, n = size(b,1); end m = size(b,2); % Pad or truncate b if necessary if size(b,1)