"Undefined function or method 'eq' for input arguments of type 'cell'."
1 回表示 (過去 30 日間)
古いコメントを表示
i get "Undefined function or method 'eq' for input arguments of type 'cell'." error in this statment find(compare==max(compare)) , compare is a cell .. any help ?
0 件のコメント
回答 (1 件)
Sean de Wolski
2014 年 12 月 12 日
You can't take the max of a cell, it's a container. If you want the max of all of the elements in the cell, use cellfun
mxc = cellfun(@(x)max(x(:)),your_cell)
mxc will be the max of each cell and you can then use your above code to figure out which ones are the mask.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!