multiple conditions in matrix
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abdul rehman
am 10 Jul. 2021
Kommentiert: abdul rehman
am 10 Jul. 2021
I am receiving this error while applying multipe conditions in matrix
Code:
C= [rand(100,1),randi([0,2],100,1),randi([0,2],100,1),randi([5,12],100,1)]
d=C(C(:,2) == 1,: && (:,3) == 2, :)
0 Kommentare
Akzeptierte Antwort
Simon Chan
am 10 Jul. 2021
Bearbeitet: Simon Chan
am 10 Jul. 2021
Do you want this?
d=C(C(:,2) == 1 & C(:,3) == 2)
2 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!