Hello, I have a big matrix where the 1st column varies for the year (1993 to 2014), 2nd column is month, 3rd column is day, 4th is hour, fifth min, sixth second and the last column is value. The value of 4th column varies from 0 to 23 hr, making a full day.
1993 4 2 0 0 0 2,441993 4 2 0 15 0 2,341993 4 2 0 30 0 2,211993 4 2 0 45 0 2,141993 4 2 1 0 0 2,041993 4 2 1 15 0 1,981993 4 2 1 30 0 1,921993 4 2 1 45 0 1,871993 4 2 2 0 0 1,791993 4 2 2 15 0 1,751993 4 2 2 30 0 1,731993 4 2 2 45 0 1,731993 4 2 3 0 0 1,721993 4 2 3 15 0 1,731993 4 2 3 30 0 1,781993 4 2 3 45 0 1,77..................................................................................................................................................................2014 12 31 21 0 0 3,822014 12 31 21 15 0 3,892014 12 31 21 30 0 3,882014 12 31 21 45 0 3,892014 12 31 22 0 0 3,902014 12 31 22 15 0 3,852014 12 31 22 30 0 3,812014 12 31 22 45 0 3,742014 12 31 23 0 0 3,662014 12 31 23 15 0 3,562014 12 31 23 30 0 3,452014 12 31 23 45 0 3,34
I have to group the similar 4th row element (which varies from 0 to 23) and find out mean of the last column. So, the desired output would be:
1993 4 2 0 0 0 2.281993 4 2 1 0 0 1.951993 4 2 2 0 0 1.751993 4 2 3 0 0 1.75..........................................................................................................2014 12 31 21 0 0 3,872014 12 31 22 0 0 3.82
Any help on this?
Best Answer