Split Table data based on Day Names
Show older comments

Hi all, I would like to split the table data based on Day Names (sample data attached). In detail, for my data I would like to split the table data for Monday, Tuesday etc (seven days) separately. Many thanks in advance
Accepted Answer
More Answers (1)
Steven Lord
on 16 Apr 2021
0 votes
Do you want to have seven individual variables or do you want to operate on the set of rows in your table data where each row in the set has the same day name?
If the latter look at findgroups, splitapply, groupsummary, grouptransform, and the other functions listed in the "See Also" sections of the documentation pages for those functions. The stack or unstack functions may also be of interest. Alternately turn your table array into a timetable array and see if retime does what you want.
1 Comment
Ganesh Naik
on 17 Apr 2021
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!