finding a number between 2 numbers

I need to locate and pull out a value between 2 numbers within a random matrix. For example, [88 65 98 34 100] I'd want to pull out all numbers between 95 and 100 which would be 98 and 100.

 採用された回答

David Hill
David Hill 2022 年 9 月 8 日

0 投票

m=[88 65 98 34 100];
m(m>=95&m<=100)
ans = 1×2
98 100

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeRandom Number Generation についてさらに検索

製品

リリース

R2022a

タグ

質問済み:

2022 年 9 月 8 日

回答済み:

2022 年 9 月 8 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by