How do I use a timevector of format HH:MM:SS created using datestr in creating a timeseries object?
1 回表示 (過去 30 日間)
古いコメントを表示
I had created a timevector using datestr function. This timevector needs to go in place of timevalues in the timeseries function. But when I create the timeseries object I am getting number values in the time values, and not in the HH:MM:SS format. The time values in the timeseries object are of the format ![Annotation 2019-03-29 121113.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/210986/Annotation%202019-03-29%20121113.jpeg)
![Annotation 2019-03-29 121113.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/210986/Annotation%202019-03-29%20121113.jpeg)
time=datestr(total,'HH:MM:SS'); % total is the no. of days from matlab reference
Ts=timeseries(field/1000,time);
0 件のコメント
採用された回答
Walter Roberson
2019 年 3 月 29 日
編集済み: Walter Roberson
2019 年 3 月 29 日
You have to set the Timeinfo Units and Format properties
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Time Series についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!