How to take mean of rows of particular value?
Afficher commentaires plus anciens
I have an excel file with three columns (Year, Month, Temp). I wanted to find the monthly mean of Temp values from 1997 to 2019 i.e. Jan-97, Feb-97 and so on...
Now, the table (file atteached) has many values for Month 1, Month 2, etc. This is because I have extracted values from different grid points and hence is a little messy. It looks like this:

I used the sortrows function to order the table. However, I do not know how to proceed further. My main aim is to sort the data with respect to Month (Jan-1997, Feb-1997 ... Dec-2019) and then calculate the monthly mean of Temp values from Jan-1997 to Dec-2019. Looking forward to your assistance
2 commentaires
darova
le 26 Avr 2020
Everything looks correct. Sortred by rows. What is wrong?
Use mean to calculate mean value
Keegan Carvalho
le 26 Avr 2020
Modifié(e) : Keegan Carvalho
le 26 Avr 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Shifting and Sorting Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


