%perform the discrete cosine transform %Some parts of code obtained from %http://math.gmu.edu/~tsauer/class/447/proj/chap11.pdf function C=dct(X) [m,n]=size(X);n=m; for i=1:n for j=1:n C(i,j)=sqrt(2/n)*cos((i-1)*(j-1/2)*pi/n); end end C(1,1:n)=ones(1,n)/sqrt(n);
Not enough input arguments. Error in dct (line 7) [m,n]=size(X);n=m;