Azzera filtri
Azzera filtri

Breaking down arrays into multiple smaller arrays

1 visualizzazione (ultimi 30 giorni)
Saeid
Saeid il 30 Mar 2018
Risposto: Walter Roberson il 30 Mar 2018
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?

Risposte (1)

Walter Roberson
Walter Roberson il 30 Mar 2018
splitapply(@(M) {M}, YourData, findgroups(YourData(:,3)))

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by