%Some parts of code obtained from
%http://math.gmu.edu/~tsauer/class/447/proj/chap11.pdf

function Xc = dequant(Y,C,Q)
Xc = Y.*Q;  % multiply each value by quantization matrix
Xc = C'*Xc*C;  % perform inverse 2D-DCT
Xc = Xc + 128; % put pixels to original values
Not enough input arguments.

Error in dequant (line 5)
Xc = Y.*Q;  % multiply each value by quantization matrix