MATLAB: Aggregate data of a dataset

aggregateMATLABstatistics

Hi guys how can I aggregate data vom my dataset array?

Best Answer

check out splitapply. You may need to change the format of your data, but it does exactly what you want:
G = findgroups(ds.seats);
mean_dist = splitapply(@mean,ds.score,G);
Switching to tables is probably a good idea:
ds = readtable("datasetT.csv");