フィルターのクリア

Search for values in a matrix

6 ビュー (過去 30 日間)
Scott Dean Seedell
Scott Dean Seedell 2022 年 9 月 9 日
編集済み: Walter Roberson 2022 年 9 月 13 日
I'd like to search the first two columns of a matrix for a specific value and then return the whole row for any that match. Thanks in advance.

採用された回答

Walter Roberson
Walter Roberson 2022 年 9 月 9 日
編集済み: Walter Roberson 2022 年 9 月 13 日
mask = any(YourMatrix(:, 1:2)==SearchValue,2);
subset = YourMatrix(mask, :) ;

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by