How to pick values that is below a certain value in a matrix/vector

47 ビュー (過去 30 日間)
Trond Oesten
Trond Oesten 2015 年 4 月 15 日
コメント済み: Trond Oesten 2015 年 4 月 15 日
Hi,
I have a vector (A) that contains 10 values.
E.g. A = [1 5 9 4 6 2 1 7 6 4]
What I want is to pick values from the vector that is larger than 5 and sample these in a new vector.
Is there an easy way to do this?
Thanks!

採用された回答

Renato Agurto
Renato Agurto 2015 年 4 月 15 日
you can try:
B = A(A>5)
I hope this helps

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by