create cell array or matrix based on groups

2 ビュー (過去 30 日間)
Ali Sarab
Ali Sarab 2021 年 7 月 7 日
コメント済み: Scott MacKenzie 2021 年 7 月 7 日
i have 1 to 365 rows of date index for every days of one year and number of infected people by gender in each row and its location(17), here is my data columns
dateindex male female location age
1 1 0 newyork 25
1 0 0 newdehli 35
2 0 1 newyork 22.5
2 1 0 kentucki 15
2 0 1 california 30
3 0 0 newdehli 30
4 1 0 newyork 45
4 1 0 newdehli 52
4 0 1 newyork 71
4 0 0 newyork 65
I want to create 17 cell arrays or matrix according to my 17 different location which contain total number(sum) of male and female infected and mean age of them in each rows and combining duplicates of rows in a specific days and applying count of male and female and average to seprate columns and 17 matrices each for one location
requested columns ie. new york
dateindex totalmale totalfemale meanage
1 calculated calculated calculated
2 calculated calculated calculated
3 calculated calculated calculated
4 calculated calculated calculated
thanks for your solution or solutions
  2 件のコメント
KSSV
KSSV 2021 年 7 月 7 日
What you have attempted for the task?
Scott MacKenzie
Scott MacKenzie 2021 年 7 月 7 日
It would help if you posted the data and clarified further what sort of analyses or summaries your are attempting.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Preprocessing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by