Delete values in a vector based on another vector
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Francisco Anaya
am 3 Apr. 2019
Beantwortet: madhan ravi
am 3 Apr. 2019
I have two arrays
I have two data vectors A (consiting of an array of 90872x2 double) and B (consisint of an array of 90872x2 double). As follows:
A(:,1)= A(:,2)= B=
1 2 1
1 2 1
1 2 1
2 1 1
1 1 0
1 1 0
1 1 1
2 1 0
2 1 0
2 1 0
2 1 0
2 2 1
I want to delete values in A when B is equal to zero. Therefore, my new A will be:
A(:,1)= A(:,2)=
1 2
1 2
1 2
2 1
1 1
2 2
Any help
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!