Extracting certain months from an array
6 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
KSSV
2018 年 3 月 14 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dates and Time についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!