How to find splitapply for multiple values

1 回表示 (過去 30 日間)
Lakshita Lakshita
Lakshita Lakshita 2021 年 2 月 23 日
コメント済み: Lakshita Lakshita 2021 年 2 月 23 日
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?

採用された回答

Matt J
Matt J 2021 年 2 月 23 日
編集済み: Matt J 2021 年 2 月 23 日
[G, idOcc,idAge] =findgroups(x.occupation,x.Age)
  1 件のコメント
Lakshita Lakshita
Lakshita Lakshita 2021 年 2 月 23 日
Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by