how can i find specific elements from a 1xN array?
조회 수: 2 (최근 30일)
이전 댓글 표시

like from the image above i want to find 1's and 0's from an array and store sequentially in another array
채택된 답변
Jan
2017년 3월 15일
The question is avgue. Perhaps this helps:
Index = or(A == 0, A == 1);
result = B(Index);
댓글 수: 2
Jan
2017년 3월 15일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!