Filter löschen
Filter löschen

Extracting certain months from an array

4 Ansichten (letzte 30 Tage)
Espen Mikkelsen
Espen Mikkelsen am 14 Mär. 2018
Beantwortet: KSSV am 14 Mär. 2018
Hey. I have some 40x60x157800 arrays. 40x60 is values from measurements. 157800 measurements for every hours through 17 years. I have another array with datetime, and wants the months 5,6 and 7 in a different array. I have tried this:
summermonths = A(:,:,month(dates)==5);
But then I only get one month at the time. How can I do?

Antworten (1)

KSSV
KSSV am 14 Mär. 2018
Read about datevec. This splits your dates into years, months, days and time. From this you can get the index of the months you want.

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by