How to extract monthly data in a matrix
Mostrar comentarios más antiguos
Dear all,
I have a matrix of monthly precipitation values for a period of 30 years, from 1971 to 2000 (see Fig. 1 attached).
I would like to extract for each month the values of precipitation of all the years considered, as shown in Fig. 2 (I did it manually). Since I have to repeat this procedure for several climate models, could you please give me any suggestion on how to automatize the extraction?
BR,
Stefania
Respuesta aceptada
Más respuestas (2)
Jasmine
el 25 de Mzo. de 2025
0 votos
% Extract Monthly Rainfall
monthlyRainfall = accumarray([data.YEAR, data.MONTH], data.RAINFALL, [RAINFALL], @sum);
Jasmine
el 25 de Mzo. de 2025
0 votos
% Extract Monthly Rainfall
monthlyRainfall = accumarray([data.YEAR, data.MONTH], data.RAINFALL, [RAINFALL], @sum);
Categorías
Más información sobre Climate Science and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!