how can i select specific rows and sum the values later
Show older comments
Hi all; i have a problem to select every row. for eg: i have matrix 2600x25. one of the columns is the day of data, 1 to 31 representing each day in the month, and each number is repeated around 95 times, i want to select data for example for Monday from this month, how can matlab know that this number represents Monday of the month in 2007? and how can i choose the whole Mondays rows for example in this month, the expected number of rows will be 4*95 = around 400 rows representing that specific day .
thanks a lot in advance if somebody can help me.
regards
2 Comments
John Chilleri
on 20 Sep 2017
You might find the day function useful (can see documentation here). Otherwise, you can probably just identify the first Monday of 2007 and keep adding 7 using modulus for the months (brute force solution).
MAHMOUD ALZIOUD
on 20 Sep 2017
Accepted Answer
More Answers (0)
Categories
Find more on Language Fundamentals 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!