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!