?? Undefined function or method 'svd' for input arguments of type 'double' and attributes 'full 3d real'.
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(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
iron man
2016-5-8
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Eigenvalues 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!