Problem with random variables in Matlab's PCA

Summary
I cannot calculate the random variables associated to the eigenfuctions of the principal component analysis.
Hello.

I have designed a Gaussian kernel as:

[X,Y] = meshgrid(0:0.002:1,0:0.002:1);
Z=exp((-1)*abs(X-Y));

Now, I calculate PCA:

[coeffG, scoreG, latentG, tsquaredG, explainedG, muG]=pca(Z, 'Centered',false);

I can rebuid the original data propperly as defined in the dcumentation https://la.mathworks.com/help/stats/pca.html#bth9ibe-coeff:

Zrec=scoreG*coeffG';

Now, I wish to calculate the uncorrelated random variables which acompany the eigenvectors, columns of scoreG. For that, I do the following:

randvarG=Z*scoreG(:,1); However, the resulting histogram of randvarG does not look gaussian at all.

Any hindsight on what I am doing wrong is very appreciated.
Thanks for reading
 

Want to reply to this thread?

"Problem with random variables in Matlab's PCA" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top