Princomp has been removed. Use PCA instead.

조회 수: 14 (최근 30일)
Mohamad Afiq
Mohamad Afiq 2019년 3월 2일
답변: Sourabh 2025년 2월 18일
Hey guys. Can anyone help me convert the 'princomp' command to 'pca' ? Below are the coding.
pca_coeff{i} = princomp(feat');
pca_coeff{i} = pca_coeff{i}(:, 1:floor(size(feat,1)/2))';
In the MATLAB, it says that 'princomp has been removed. Use pca instead.'
Thank you. I'm very appreciate if there any answer from anyone.

답변 (2개)

Houhao Liang
Houhao Liang 2019년 11월 21일
Have you figured it out?

Sourabh
Sourabh 2025년 2월 18일
The “pca” function is a replacement for the “princomp” function that works in recent releases.
Replace the first line from
pca_coeff{i} = princomp(feat');
to
pca_coeff{i} = pca(feat');
I hope this helps!

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by