how can i find specific elements from a 1xN array?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161733/image.png)
like from the image above i want to find 1's and 0's from an array and store sequentially in another array
1 Kommentar
Akzeptierte Antwort
Jan
am 15 Mär. 2017
The question is avgue. Perhaps this helps:
Index = or(A == 0, A == 1);
result = B(Index);
2 Kommentare
Jan
am 15 Mär. 2017
I do not understand you notation. A is a [1 x 9] vector, but what is the line on top? What dimension has your "index"? Please post the original code which runs by copy&paste.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!