Index Non-Empty Cells in Cell Array
显示 更早的评论
Hi,
I have the following cell array
TEST = [1] [] [] [] []
I want to get the index position of the non-empty cell. I know I can do this using a loop, but is there any single command (like "find") that will do this?
Thank you!
JF
采纳的回答
更多回答(1 个)
Attila
2017-5-16
1 个投票
Dear Mubarak,
This will work : find(~cellfun(@isempty,a'));
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!