ntroduction--><pre class="codeinput"><span class="comment">% This file is from pmtk3.googlecode.com</span>

setSeed(0);
n = 5;
X=[randn(n,2)+2.*ones(n,2);2.*randn(n,2)-2.*ones(n,2)];

[n d] = size(X);
[W, Z, evals, Xrecon, mu] = pcaPmtk(X, 1);

figure;
plot(mu(1), mu(2), <span class="string">'*'</span>, <span class="string">'markersize'</span>, 20, <span class="string">'color'</span>, <span class="string">'r'</span>);
hold <span class="string">on</span>
plot(X(:,1), X(:,2), <span class="string">'ro'</span>,