Indexing of an array

1 回表示 (過去 30 日間)
galben
galben 2022 年 10 月 20 日
コメント済み: galben 2022 年 10 月 22 日
I have a result array of 50 x 50 and i would like to extract all information for when a certain column equal a certain result.
  1 件のコメント
David Hill
David Hill 2022 年 10 月 20 日
Hard to understand what you are asking. A simple example would be beneficial.

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

採用された回答

Matt J
Matt J 2022 年 10 月 20 日
編集済み: Matt J 2022 年 10 月 20 日
Simplified example:
array=randi(10,5)
array = 5×5
10 10 7 2 4 4 7 10 7 10 1 8 4 2 7 3 7 10 5 5 9 7 10 10 2
test=array(:,5)>4;
subset=array(test,:) %rows where 5th column is greater than 4
subset = 3×5
4 7 10 7 10 1 8 4 2 7 3 7 10 5 5
  1 件のコメント
galben
galben 2022 年 10 月 22 日
thanks this worked well

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by