check values of all elements of an array
5 ビュー (過去 30 日間)
古いコメントを表示
I have array which has multiple elements. I want to find the elements that are larger than 1 and put the value with the index of the element in a new array.
I need to know whether it was elemet 10 or 12 that the value was larger than one and what was the value.
I need to avoid loop as much as possible. What would be the shortest way?
0 件のコメント
回答 (1 件)
madhan ravi
2019 年 9 月 6 日
Use find() , logical operators also use ismember() to know the existence of those numbers.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!