pcares
Residuals from principal component analysis.
📝Syntax
residuals = pcares(X, NumComponents)
[residuals, reconstructed] = pcares(X, NumComponents)
📄Description

pcares returns residuals obtained by retaining the requested number of principal components of the data matrix X.

The reconstructed output is the low-dimensional approximation of X, and residuals is equal to X minus reconstructed.

💡Examples
X = [1 2; 3 4; 5 8; 7 11];
[residuals, reconstructed] = pcares(X, 1)
🔗See Also
pcapcacov
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub