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!