any faster/straightforward way to find the location of empty cell in a cell array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Yu Li
am 26 Nov. 2018
Bearbeitet: madhan ravi
am 26 Nov. 2018
Hi:
I have a cell array called 'tmp', it is either '1' or 'empty' inside. I want to find the location where '1' is in the 'tmp', what I did is use 'for-loop' to read inside one-by-one. is there any more straightforward way to do this?
Thanks!
Yu
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 26 Nov. 2018
Bearbeitet: madhan ravi
am 26 Nov. 2018
index=find(cellfun(@isempty,tmp(:))) %returns index
command window:
index =
1
2
3
4
10
11
>>
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Types finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!