How to extract column information of a mix cell array! - Please Help :(
Ältere Kommentare anzeigen
Hi the wonderful MatLab community!
Im very new to MatLab and urgently require some assistance please!
I have a cell array
C=
1 '100'
2 '200'
3 '200'
4 '100'
5 '200'
...etc
The cell array changes will always have the two columns but will have random number of rows. The first column will always start from 1 and increase in sequential order moving down the cell array. The second column will only have numbers of either '100' or '200'.
How do you convert array of C such that C(:,2) == 200; basically outcome of array D to be:
D=
2
3
5
...etc
Akzeptierte Antwort
Weitere Antworten (1)
Andrei Bobrov
am 2 Sep. 2017
cat(1,C{ismember(C(:,2),'200'),1})
1 Kommentar
Wilson Weng
am 3 Sep. 2017
Bearbeitet: Wilson Weng
am 3 Sep. 2017
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!