I have data every 14, 15 or 16 minutes and met data every 1 minutes. I want to average met data according to the 14, 15 and 16 minutes

3 ビュー (過去 30 日間)
ACSM instrument time stamp is either 14, 15 and 16 minutes so, time 1 = a ; time 2 = b
Time ACSM
13-06-2021 00:04:38
13-06-2021 00:20:19
13-06-2021 00:36:01
13-06-2021 00:51:42
13-06-2021 01:07:23
13-06-2021 01:23:05
13-06-2021 01:38:46
13-06-2021 01:54:27
13-06-2021 02:10:08
13-06-2021 02:25:50
13-06-2021 02:41:31
13-06-2021 02:57:12
13-06-2021 03:12:54
13-06-2021 03:28:36
13-06-2021 03:44:18
13-06-2021 04:00:00
13-06-2021 04:15:42
13-06-2021 04:31:26
Difference between the time could be 14, 15 or 16 minutes so, x = time 1 - time 2
met data is for every 1 minute
13-06-2021 00:48 20.7 82.57 1022.52 235 3.992 0
13-06-2021 00:49 20.58 83.42 1022.51 226.9 4.8 0
13-06-2021 00:50 20.4 83.43 1022.49 229.5 4.323 0
13-06-2021 00:51 20.27 83.85 1022.46 220.3 4.537 0
13-06-2021 00:52 20.1 84.05 1022.49 225.9 6.133 0
13-06-2021 00:53 19.87 83.95 1022.43 237.3 4.962 0
13-06-2021 00:54 19.79 85.35 1022.48 225.1 4.812 0
13-06-2021 00:55 19.7 86.43 1022.46 238.7 4.18 0
13-06-2021 00:56 19.66 86.6 1022.46 233.5 5.088 0
13-06-2021 00:57 19.62 87.82 1022.47 234.1 4.442 0
13-06-2021 00:58 19.56 87.9 1022.44 234.6 4.045 0
13-06-2021 00:59 19.58 87.82 1022.48 226.1 4.66 0
13-06-2021 01:00 19.46 87.73 1022.48 234.9 5.245 0
13-06-2021 01:01 19.4 88.67 1022.49 220.8 4.742 0
13-06-2021 01:02 19.31 88.18 1022.48 230.9 4.515 0
13-06-2021 01:03 19.31 88.8 1022.46 237.2 4.317 0
13-06-2021 01:04 19.38 89.05 1022.46 221.3 3.418 0
13-06-2021 01:05 19.43 88.6 1022.44 223.5 3.938 0
13-06-2021 01:06 19.38 88.38 1022.42 229.4 4.088 0
13-06-2021 01:07 19.43 89.32 1022.39 235.1 3.622 0
13-06-2021 01:08 19.52 88.42 1022.4 223.2 3.843 0
13-06-2021 01:09 19.49 86.78 1022.4 225.4 3.598 0
13-06-2021 01:10 19.6 87.9 1022.38 223.8 2.555 0
13-06-2021 01:11 19.75 86.03 1022.35 201.9 2.257 0
13-06-2021 01:12 19.83 85.85 1022.34 224.7 3.253 0
13-06-2021 01:13 19.96 86.68 1022.32 228 4.017 0
13-06-2021 01:14 19.88 86.4 1022.32 217.5 3.875 0
Time 1 from met = a
TIme 2 from met = a + x
Average the met between these two time stamp
I want to correlate these two time stamp and find the avergae of the data
  5 件のコメント
dpb
dpb 2022 年 7 月 6 日
Again, you'll make it easier and more likely somebody will take some time if you attach the sample data as .mat file...
Kavyashree N Kalkura
Kavyashree N Kalkura 2022 年 7 月 11 日
Sample1 = is the time range I want
sampe2 = is the every minute data which should be averaged to the sample 1 time

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

採用された回答

dpb
dpb 2022 年 7 月 11 日
load Sample1
load Sample2
ttM=table2timetable(Mettimedata);
ACSMtimedata.TimeACSM=datetime(ACSMtimedata.TimeACSM,'InputFormat',"dd-MM-uuuu HH:mm:ss");
ttMettMean=retime(ttM,ACSMtimedata.TimeACSM,'mean');
  3 件のコメント
dpb
dpb 2022 年 7 月 12 日
編集済み: dpb 2022 年 7 月 12 日
You'll have to find the portion that is formatted each way and convert them appropriately. Best would probably be to go back to the creation point and fix the inconsistency there.
There's really no programmatic way to tell for dates in which the month and day values are in the range 1:12; either field is valid -- if a value is >12, then it obviously must be a day is the best that can be done with just a numeric comparison of the values in the string. Beyond that, there has to be some other way to know "who's who in the zoo"...such as, hopefully the data are in chronological order and one can find the sections by comparison in sequence or the two formats were collected independently and later pasted together so can go back and fix the original or ...
Kavyashree N Kalkura
Kavyashree N Kalkura 2022 年 7 月 12 日
Thank you so much. I was able to change the timestamp and have successfully got the mean for all the time.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series Objects についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by