searching part of matrix in every cell of a cell array
2 次查看(过去 30 天)
显示 更早的评论
A is a cell array containing matrices with different sizes in each cell:
A={[5x4],[5x3],[5x20]}
I know, it is possible to search the cell array for a particular number (code) using cellfun.
find( cellfun(@(f) (f==code), A )
Is it possible to search just the first row of the matrices in each cell array for that code? What I was trying to do, but does not work, is:
find( cellfun(@(f) (f==code), A{:}(1,:))
I need the indices of cells which contain the code in the first row. Is there a solution without using a for loop?
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 LaTeX 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!