How to extract certain values from an array

114 ビュー (過去 30 日間)
Lama Shalabi
Lama Shalabi 2021 年 3 月 26 日
コメント済み: Lama Shalabi 2021 年 3 月 26 日
I have an array:
x=[8,5,5,5,9,4,3,2,9,10]
I would like to create a new array but only with values less than 7. How can I do this?
Thank you in advance!

採用された回答

per isakson
per isakson 2021 年 3 月 26 日
>> x=[8,5,5,5,9,4,3,2,9,10];
>> new = x(x<7)
new =
5 5 5 4 3 2
  1 件のコメント
Lama Shalabi
Lama Shalabi 2021 年 3 月 26 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by