Error in Principal Component Analysis (PCA) matlab
조회 수: 5 (최근 30일)
이전 댓글 표시
Error in Principal Component Analysis (PCA) matlab. I applied PCA on matlab using my variable fextracted. It is a 22 x 16 array . I only have fextracted as the information. Please help me with the steps to do PCA. Attached are my data (fextracted) and my PCA code. I dont understand what should i do first before using the PCA() function on MATLAB. Ive seen tutorials and read from matlab PCA docs but i did not manage to figure it out. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/637235/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/637235/image.jpeg)
채택된 답변
Cris LaPierre
2021년 5월 31일
You are getting this error because you have overwritten MATLAB's pca function with your pca.m file. Rename your file, and your call to pca should work.
댓글 수: 3
Cris LaPierre
2021년 5월 31일
The error message suggests otherwise. Run the following code in the command window
which pca
The result should be something like this: C:\Program Files\MATLAB\R2021a\toolbox\stats\stats\pca.m
Your syntax is correct.
fextracted = rand(22,16);
[coeff,score,latent,tsquared,explained] = pca(fextracted)
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!