span>;
  title(sprintf(<span class="string">'principal basis %d'</span>, i))
<span class="keyword">end</span>
printPmtkFigure(sprintf(<span class="string">'pcaImages-%s-basis'</span>,name));


<span class="comment">% Plot reconstruction error</span>
figure(3); clf
n = size(X,1);
Ks = [1:10 10:5:50 50:25:rank(X)];
clear <span class="string">mse</span>
<span class="keyword">for</span> ki=1:length(Ks)
  k = Ks(ki);
  <span class="comment">%Xrecon = U(:,1:k) * S(1:k,1:k) * V(:,1:k)' + repmat(mu, n, 1);</span>
 