Why pca doesn't work on matlabR2013b?

I'm trying to run pca on a dataset that I have and I'm finding an error, then I tried:
TT=pca(randn(20,200));
It gives me the same following error message:
Undefined variable "classreg" or class "classreg.learning.internal.wnanmean".
Error in pca (line 297) mu = classreg.learning.internal.wnanmean(x, vWeights);

4 Kommentare

Youssef  Khmou
Youssef Khmou am 11 Mär. 2014
Bearbeitet: Youssef Khmou am 11 Mär. 2014
do you have the function wmspca?
>>which wmspca
Michelle
Michelle am 11 Mär. 2014
Apparently yes
which wmspca
C:\Program Files\MATLAB\R2013b\toolbox\wavelet\wmultisig1d\wmspca.m
Anne
Anne am 10 Jul. 2014
Michelle - Do you remember how you resolved this issue? I'm facing the same problem right now...
Thanks for any hints you may have!
Anne
Anne am 11 Jul. 2014
If anyone else has this problem in the future, I just got it resolved through tech support.
It seems like MATLAB might be looking in the wrong directories for the definition of "classreg". This error occurs during installation sometimes. Please execute the following at the command line:
>> restoredefaulthpath; >> rehash toolboxcache; >> savepath;
Then, try executing your code.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Youssef  Khmou
Youssef Khmou am 11 Mär. 2014
Bearbeitet: Youssef Khmou am 11 Mär. 2014

0 Stimmen

hi, i am not aware about the error, but technically this alternative multiscale pca needs some details , let us take the example you tried before, 20 signals each of length 200.
x=randn(200,20);
% additional parameters.
level = 5;
wname = 'sym4'; %
npc = 'kais';
[x_sim, qual, npc] = wmspca(x,level,wname,npc);
subplot(1,2,1); plot(x(:,1)); title(' original first signal')
subplot(1,2,2); plot(x_sim(:,1),'r'); title(' transformed first signal')
try to manipulate the parameters using Documentation
But that result damaged the correlation property of the random signals :
surf(cov(x))
figure; surf(cov(x_sim))

2 Kommentare

Michelle
Michelle am 11 Mär. 2014
Thanks for your help but I really need the regular PCA for a paper comparison.
try this function if you cant fix the error .
<http://crcv.ucf.edu/source/dimension%20reduction/pca.m>

Melden Sie sich an, um zu kommentieren.

Ilya
Ilya am 11 Mär. 2014

0 Stimmen

I suggest that you get in touch with the tech support. (You can find their phone number and email at mathworks.com.) There may be an issue in your MATLAB installation.

Kategorien

Tags

Gefragt:

am 11 Mär. 2014

Kommentiert:

am 11 Jul. 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by