Problem in calculating Principal Component Analysis
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!