Hi forum,
first post here – hope you guys can help me out:
I have a 4515 x 3 array sorted like this:
In the first column are the IDs for 8 different stations, already sorted (9002, 9002, …. , 9002, 9004, 9004 …. , 9004, 9011, … and so forth, in the second column are the months of measuring (1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4 etc) and in the third column are all the individual readings for each station for each month. The data set is for several years, so there will be several loops of all 12 months for each station.
What I need to do is compute the mean of all the readings from the same month for the same station, so I can get a matrix like this:
Jan Feb Mar ...9002 X9004...
so with X being the mean of all the readings from all the Januaries for station 9002.
I'm relatively new to MATLAB, and I don't really have any idea of how to approach this problem… Hope you can help me!
Cheers, Simon
Best Answer