Index Non-Empty Cells in Cell Array
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Attila
am 16 Mai 2017
1 Stimme
Dear Mubarak,
This will work : find(~cellfun(@isempty,a'));
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!