Filter table data into matrix

1 vue (au cours des 30 derniers jours)
Annymm
Annymm le 1 Oct 2020
I have rainfall amount data by month for seveeral years and different weather stations. I want to filter the data for May, June July into a new table. How can I do that? My table looks like this:
Date Georgetown Kamarang Lethem Mabaruma NewAmsterdam Timehri
1971-01 120 146.3000 195.6000 227.4000
1971-02 78.9000 82.8000 31.9000 68.8000
1971-03 80.2000 65.1000 15.3000 111.5000
1971-04 126.8000 173.2000 28.1000 178.3000
1971-05 374.6000 271 150.6000 411.3000
1971-06 401.2000 479.1000 505.3000
1971-07 296.6000 320.9000 317 243.5000
1971-08 347.7000 249.1000 227.8000 189.6000 348.4000
1971-09 108.4000 190.9000 104.9000 228.1000 123.1000

Réponses (1)

Eric Sofen
Eric Sofen le 2 Oct 2020
From your description, it sounds like you want data for MJJ for all years? Assuming your data is in a timetable and your dates are represented as datetime:
t(ismember(month(t.Date), [5:7]),:)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by