필터 지우기
필터 지우기

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 CenterFile Exchange에서 Dimensionality 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