function op = opDCT(n)

% OPDCT  One-dimensional discrete cosine transform (DCT)
%
%    OPDCT(N) creates a one-dimensional discrete cosine transform
%    operator for vectors of length N.

%   Copyright 2008, Ewout van den Berg and Michael P. Friedlander
%   http://www.cs.ubc.ca/labs/scl/sparco
%   $Id: opDCT.m 1040 2008-06-26 20:29:02Z ewout78 $

op = @(x,mode) opDCT_intrnl(n,x,mode);


function y = opDCT_intrnl(n,x,mode)
checkDimensions(n,n,x,mode);
if mode == 0
   y = {n,n,[0,1,0,1],{'DCT'}};
elseif mode == 1
   y = idct(x);%imdct(x);
else
   y = dct(x);%mdct(x);
end
