Retime function creates new rowtimes going back to 1899

2 ビュー (過去 30 日間)
Poison Idea fan
Poison Idea fan 2023 年 5 月 31 日
編集済み: the cyclist 2023 年 5 月 31 日
I have a timetable of data that I am trying to average to two minutes. When I use:
CO2_TT = retime(CO2_TT,'regular','mean','TimeStep',minutes(2));
It creates new row times going back to the year 1899. I've not seen this happen before and I use retime everyday. I have another timetable in the workspace that does not have this error. What would trigger this?
load CO2_TT.mat
CO2_TT = retime(CO2_TT,'regular','mean','TimeStep',minutes(2));

採用された回答

the cyclist
the cyclist 2023 年 5 月 31 日
編集済み: the cyclist 2023 年 5 月 31 日
You have a few dates from 1899 in your input data
load CO2_TT.mat
[minDateTime,indexToMinDatetime] = min(CO2_TT.DateTime)
minDateTime = datetime
31-Dec-1899
indexToMinDatetime = 649
CO2_TT(CO2_TT.DateTime==min(CO2_TT.DateTime),:)
ans = 3×11 timetable
DateTime Time Date co2_ppb hico2 intt cht pres smplfl speed biasv intensity ___________ ____ ____ _______ _____ ____ ___ ____ ______ _____ _____ _________ 31-Dec-1899 NaN NaT NaN NaN NaN NaN NaN NaN NaN NaN NaN 31-Dec-1899 NaN NaT NaN NaN NaN NaN NaN NaN NaN NaN NaN 31-Dec-1899 NaN NaT NaN NaN NaN NaN NaN NaN NaN NaN NaN

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTimetables についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by