?? Undefined function or method 'svd' for input arguments of type 'double' and attributes 'full 3d real'.
이전 댓글 표시
can someone assist me? i am trying to use the matlabs svd function but it returned an error
"?? Undefined function or method 'svd' for input arguments of type 'double' and attributes 'full 3d real'.".
here is part of the code i was working on:
F=imread(irisFileName); G=im2double(F);
%perform singular value decomposition
xpattern=svd(G);
P=[xpattern' str2num(irisFiles(i).name(1:3))];
T=[T;P];
irisFileName
[size(P) size(T)]
end
end
thanks
답변 (2개)
Wayne King
2013년 3월 22일
편집: Wayne King
2013년 3월 22일
svd() only works on a 2-D matrix, although I'm surprised by your error message.
I would have expected:
"Error using svd Input must be 2-D."
You are using the MathWorks' svd() function, correct?
If you enter,
>>which svd
you get back some path like:
...matlab\matfun\@single\svd
댓글 수: 6
ibrahim
2013년 3월 22일
Wayne King
2013년 3월 22일
so is your input 3-D? what is the size of G?
ibrahim
2013년 3월 22일
Wayne King
2013년 3월 22일
The above does not tell me the size of G. The above only tells me that you have converted F to a double. What does
size(G)
return?
ibrahim
2013년 3월 22일
ibrahim
2013년 3월 22일
iron man
2016년 5월 8일
0 개 추천
im getting error "Error using svd Input must be 2-D." could u hlp me?
댓글 수: 1
Walter Roberson
2016년 5월 8일
You are probably trying to do svd on an RGB image. You probably need to use rgb2gray() to convert it to grayscale.
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!