How to select a range of data in matrix

20 ビュー (過去 30 日間)
Austin Ukpebor
Austin Ukpebor 2021 年 1 月 13 日
コメント済み: Austin Ukpebor 2021 年 1 月 13 日
I have a column matrix (10608x1) with a minimum value of 38.8 and maximum value of 192.8. I want to retain the matrix with the range of minimum values to a certain number say 44.1. Please I need a help to achieve this. Thanks

採用された回答

KSSV
KSSV 2021 年 1 月 13 日
Let A be your column matrix.
idx = A <= 44.1 ; % get indices using logical indexing
iwant = A(idx) ; % Extract those elements
Read about logical indexing of arrays in MATLAB.
  1 件のコメント
Austin Ukpebor
Austin Ukpebor 2021 年 1 月 13 日
Thanks KSSV. It works!

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

その他の回答 (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