group data every 10 days(decade)?

2 ビュー (過去 30 日間)
sky walker
sky walker 2022 年 3 月 28 日
回答済み: KSSV 2022 年 3 月 29 日
i have 1 year of temperature data, I have 3 arrays - Latitude, Longitude, Temperature, times (daily)
i want to group or extract it based on date for each month
D1 = [1,2,3,4,5,6,7,8,9,10];
D2 = [11,12,13,14,15,15,17,18,19,20];
D3 = [21,22,23,24,25,26,27,28,29,30,31];
how to do that? thank
  1 件のコメント
Arif Hoq
Arif Hoq 2022 年 3 月 28 日
please attach your data.
i have 1 year of temperature data, I have 3 arrays - Latitude, Longitude, Temperature, times (daily)
i guess you have 4 columns ( Latitude, Longitude, Temperature and times)

サインインしてコメントする。

採用された回答

KSSV
KSSV 2022 年 3 月 29 日
Convert your dates into datetime or datevec. From this you can get the year, month, day etc.....from day data array, use ismember with D1, D2, D3 to get the indices and then use this indexing to extract the data.
So read about datetime / datevec, and ismember.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by