w 1 K]); montage(XX)</span>
<span class="comment">%title(sprintf('%d random training images', K))</span>
<span class="keyword">for</span> i=1:25
  subplot(5,5,i)
  f = reshape(X(perm(i),:), [h w]);
  imagesc(f);  axis <span class="string">off</span>; colormap <span class="string">gray</span>
<span class="keyword">end</span>
printPmtkFigure(sprintf(<span class="string">'pcaImages-%s-images'</span>,name));

mu = mean(X);
XC = X-repmat(mu,size(X,1),1);
sprintf(<span class="string">'Performing PCA.... stay tune