mean_face,h,w));
imagesc(reshape(X(Selected_Face,:),h,w));
title('Original Image');
recon_err=[];
for i=1:K
  X_Reconst=Xproj(Selected_Face,1:i)*B(:,1:i)' + mean_face;
  if i==10
    subplot(2,2,2)
    imagesc(reshape(X_Reconst',h,w)); axis off
    title('Reconstructed Image with 10 bases');drawnow;
  elseif i==100
      subplot(2,2,3)
      imagesc(reshape(X_Reconst',h,w)); axis off
      title('Reconstructed Image with 100 bases');drawnow;
  end
  recon_err = [recon_err;sqrt(mean((X_Reconst - (X(Selected_