How can I delete values below certain treshold in vector

5 ビュー (過去 30 日間)
Jan-Willem van de Scheur
Jan-Willem van de Scheur 2018 年 1 月 11 日
I have a 3521x1 vector and I would like to drop all values above the value of 10. How can I do this?

採用された回答

Pawel Jastrzebski
Pawel Jastrzebski 2018 年 1 月 11 日
編集済み: Pawel Jastrzebski 2018 年 1 月 11 日
vector = randi(20,1,352);
newVector = vector(vector<10);
  2 件のコメント
Jan
Jan 2018 年 1 月 11 日
Alternatively:
vector(vector <= 10) = [];
Jan-Willem van de Scheur
Jan-Willem van de Scheur 2018 年 1 月 11 日
Thanks guys!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by