getting error 'Too many output arguments.'while running [coeff,sco​re,latent,​tsquared,e​xplained] = pca(X2);

4 views (last 30 days)
getting error 'Too many output arguments.'while running [coeff,score,latent,tsquared,explained] = pca(X2); WHY so ? whats the solution. I want to calculate cumulative variance with respect to PCs.

Accepted Answer

Brent F
Brent F on 24 Jun 2021
Make sure you don't have a pca.m file in your path, such as prtools, that is overriding the built-in pca function.

More Answers (1)

Berkay TOPALOGLU
Berkay TOPALOGLU on 25 Aug 2020
i am getting the same error. How did you solve it?
I tried matlab's own instance and still get the same error.
---
load hald
[coeff,score,latent,tsquared] = pca(ingredients,'NumComponents',2);
------
Error using pca
Too many input arguments
----

Categories

Find more on Dimensionality Reduction and Feature Extraction in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!