Index Non-Empty Cells in Cell Array
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Attila
il 16 Mag 2017
1 voto
Dear Mubarak,
This will work : find(~cellfun(@isempty,a'));
Categorie
Scopri di più su Matrix Indexing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!