How do I find the cell index ??
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
BHUKYA VENKATESH
am 27 Jun. 2022
Kommentiert: BHUKYA VENKATESH
am 27 Jun. 2022
I have a cell A{3}={[1 2 3 1]} {[5 6 7 5 0]} {[9 9 10 10 12]}
I want to find the the cell number that contain 12
that is A{3}
is there any code that finds the cell number??
I dont want to use any kind of loop here.
3 Kommentare
Akzeptierte Antwort
madrix
am 27 Jun. 2022
A={[1 2 3 1],[5 6 7 5 0],[9 9 10 10 12]};
rem = cellfun(@(x) find(x == 12),A,'un',0);
idx = cellfun('isempty',rem);
find(~idx)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays 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!