Creation timeSeries using a datetime variable
이전 댓글 표시
Hi- I'm new to matlab world and I do have some issue dealing with the timeseries
I have two arrays
- One time array(name time) which is a string cell array like this "dd-MM-yyy HH:mm:SS"
- One array which represents my value for each time
I found a solution but it’s quite slow
% transformed my time array in datetime
Time2 = datetime(time,'InputFormat','dd-MM-yyyy HH:mm:SS')
%transforme my datetime array in date string
Time3= datestr(Time2)
%Create the timeseries
Ts = timeseries ( data,Time3)
This code is working but it's very slow is that possible to improve this?
Thanks in advance
Regards,
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!