hi, i want to find in a binary random matrice position of columns full of zeros (a column of zeros)..
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
loukil sana
am 11 Jan. 2016
Bearbeitet: Stephen23
am 11 Jan. 2016
is there any function in matlab which retur the position of a column ??
0 Kommentare
Akzeptierte Antwort
Stephen23
am 11 Jan. 2016
You can use all and find to locate columns containing only zeros:
>> X = randi(2,3,23)-1
X =
0 0 0 0 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0
1 0 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 1 0 0
0 1 0 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0
>> find(all(X==0,1))
ans =
3 11 12 23
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB 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!