Reason of Non-singleton dimensions mismatch in data under PCA
<p>During pca analysis using built in pca function in matlab, I faced the following error. Data is actually a feature vector obtained from 30 MR images. </p>

<pre><code>&gt;&gt; size(data)
  ans =
  30   281   389   104 

[coeff score varience] = pca(data);

Error using bsxfun
Non-singleton dimensions of the two input arrays must match each other.

Error in pca&gt;localSVD (line 468)
x = bsxfun(@times, x, PhiSqrt);

Error in pca (line 341)
    [U,sigma, coeff, wasNaN] = localSVD(x, n,...
</code></pre>

<p>Would you let me know any solution? </p>