find numbers that exceed the 50
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I've got a variable that has many numbers and I wanted to find all the numbers that exceed the number 50 (with the position of it). My variable is double.
0 件のコメント
採用された回答
Kevin Holly
2021 年 11 月 8 日
編集済み: Kevin Holly
2021 年 11 月 8 日
There is probably a better way to do the indexing, but here is my approach.
var = [ 40 30 23 90 89 53 23 123 32 50 21 32 4 65 1 100 64 29 39 293 24 57 97];
pos = 1:numel(var);
value = var(var>50)
index = pos(var>50)
0 件のコメント
その他の回答 (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!