フィルターのクリア

Problem in calculating Principal Component Analysis

1 回表示 (過去 30 日間)
Ankit Verma
Ankit Verma 2012 年 4 月 6 日
I am not able to calculate Principal Components of a RGB image without converting it into Gray image,whenever i use princomp function on it, it shows following error :-
Undefined function or method 'svd' for input arguments of
type 'double' and attributes 'full 3d real'.
Error in ==> princomp at 73 [ignore,ignore,coeff] = svd(x0,econFlag);
Please help me out

回答 (1 件)

Thomas
Thomas 2012 年 4 月 6 日
princomp performs PCA only on 2D matrices, I'm assuming your image is a 3D matrix of form n x p x m.
doc princomp
princomp(X) performs principal components analysis (PCA) on the n-by-p data matrix X, and returns the principal component coefficients, also known as loadings. Rows of X correspond to observations, columns to variables. COEFF is a p-by-p matrix, each column containing coefficients for one principal component.
here is a link to a similar problem

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by