ing">gray</span>

<span class="comment">% visualize reconstruction</span>
figure;
subplot(2,2,1)
<span class="comment">%imagesc(reshape(X(Selected_Face,:)+mean_face,h,w));</span>
imagesc(reshape(X(Selected_Face,:),h,w));
title(<span class="string">'Original Image'</span>);
recon_err=[];
<span class="keyword">for</span> i=1:K
  X_Reconst=Xproj(Selected_Face,1:i)*B(:,1:i)' + mean_face;
  <span class="keyword">if</span> i==10
    subplot(2,2,2)
    imagesc(reshape(X_Reconst',h,w)); axis <span class="string">of