フィルターのクリア

i just need to know how can i extract the columns based on a condition

2 ビュー (過去 30 日間)
omar mahallawy
omar mahallawy 2019 年 2 月 24 日
コメント済み: Andi 2022 年 3 月 31 日
Capture.PNG
the condition is (if the first value in the column is less than or equal to a certain number then extract the whole column)
10 by 13 vector, in a for loop

採用された回答

Walter Roberson
Walter Roberson 2019 年 2 月 24 日
mask = TheArray(:,1) <= ACertainNumber;
output = TheArray(mask, :);
  4 件のコメント
omar mahallawy
omar mahallawy 2019 年 2 月 25 日
Thank you so much, it worked!
Andi
Andi 2022 年 3 月 31 日
@Walter Roberson I highly appreciate your approch. I have a similar problem only the difference is in my case ACertainNumber is in a range e.g., 1-2 and then 2-3 and so on. Additionally, I need to compute the mean of ACertainNumber of all the selected coloumns. May you suggest any possible wayout.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by