I have issues using datenum function because of a different date format on excel, how can I modify my dates in matlab and then run the function?n
Mostra commenti meno recenti
Risposta accettata
Più risposte (1)
dpb
il 30 Ago 2022
You can either use an import options object from detectImportOptions in which you set the format for the date format or let it read it as cellstr or string and convert.
Presuming you've done the latter to get the posted code -- it would have been more helpful to have seen that as well as the short example section of the actual input file...
EX.DateTime=datetime(EX.DateTime,'InputFormat','HH:mm:ss, yyyy-MM-dd');
EX.Time=EX.DateTime-EX.DateTime(1); % convert to duration for use in analysis
You may also find it convenient to use seconds(EX.Time) as the analysis time variable for timeseries analyses instead of the duration class, depending upon just what functions you're planning on using; not all of the Signal Processing TB has been made datetime/duration aware.
1 Commento
Tanishq
il 30 Ago 2022
Categorie
Scopri di più su Time Series Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!