How to find splitapply for multiple values

1 visualización (últimos 30 días)
Lakshita Lakshita
Lakshita Lakshita el 23 de Feb. de 2021
Comentada: Lakshita Lakshita el 23 de Feb. de 2021
x=readtable('milgram’)
occage=findgroups(x.occupation,x.Age)
I want to find the distribution for both age and occupation
For occupation I have figured it out:
[occage, ID] =findgroups(x.occupation,x.Age)
occupation=[ID]
but Im stuck on age, how do I get the 'ID' for that/ how do I get the way the groups have been split for that?

Respuesta aceptada

Matt J
Matt J el 23 de Feb. de 2021
Editada: Matt J el 23 de Feb. de 2021
[G, idOcc,idAge] =findgroups(x.occupation,x.Age)

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by