function out=project5decoder(x,f)
b=4;
L=0.3;                         
q=2*L/(2^b-1);
n = 32;
Fs = 2^13;
for i=1:n                             % form the MDCT matrix
  for j=1:2*n
    M(i,j)= cos((i-1+1/2)*(j-1+1/2+n/2)*pi/n);
  end
end
M=sqrt(2/n)*M;
N=M';  
out=[];
for k=1:length(x)                          % loop over l ength 2n windows                   % transform components quantized
  % Storage/transmission of file occurs here  
  y2=x(:,k)*q;                            % transform components dequantized
  w(:,k)=(N*y2);                        % invert the MDCT
  if(k>1)
      w2=w(n+1:2*n,k-1);w3=w(1:n,k);
      out=[out;(w2+w3)/2];          % collect the reconstructed signal
  end                                 % (of length 2n less than length of x)
end
sound(out,Fs)