Breaking down arrays into multiple smaller arrays

1 回表示 (過去 30 日間)
Saeid
Saeid 2018 年 3 月 30 日
回答済み: Walter Roberson 2018 年 3 月 30 日
I want to break down an array such as this one:
into three separate arrays, based on the rpm column, so that at the end I will have one grren, one gray and one pink array. How can I do this efficiently?

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 3 月 30 日
splitapply(@(M) {M}, YourData, findgroups(YourData(:,3)))

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by