error in double to struct not possible??
2 views (last 30 days)
Show older comments
function img=read_query(filename)
I=imread(filename);
[c1,c2,e1,h,v,e2]=glcm_feature_extraction(I)
xlswrite('qfile.xlsx',[c1,c2,e1,h,v,e2]);
c1,c2,...... are floating point numbers.....
error using ==>horzcat
following error has occured converting from double to struct...conversion of double to struct is not possible.
thanks in adv
Answers (1)
Walter Roberson
on 19 Aug 2015
Mathworks does not supply any routine named glcm_feature_extraction(), and there is no routine by that name in the File Exchange, so we have no idea what your outputs are.
Your code can only work in the form it is now if all of the outputs c1, c2, e1, h, v, e2 are either strings or numeric arrays that have the same number of rows for every entry. The error message is consistent with at least one of the items instead being a structure of some kind. You need to examine
class(c1), class(c2), class(e1), class(h), class(v), class(e2)
I speculate that either h or v is the structure.
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!