フィルターのクリア

how to extract all rows with samen "Key" from matrix

1 回表示 (過去 30 日間)
Simon Kant
Simon Kant 2022 年 6 月 29 日
コメント済み: Simon Kant 2022 年 6 月 29 日
Hi all, I am trying to extract from a Large Matrix with almost 70000 elements all rows with the SOURCE_KEY (column 3 of the matrix) '1BY6WEcLGh8j5v7' so that only the values to the matching KEY remain.
Does anyone have any ideas?

回答 (1 件)

patrick1704
patrick1704 2022 年 6 月 29 日
Your SOURCE_KEY column is a categorical. Thus, you just have to do something like this:
reducedData = Electricity(Electricity.SOURCE_KEY == categorical({'1BY6WEcLGh8j5v7'}), :)

カテゴリ

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