cell array manipulation and cell array conversion

2 次查看(过去 30 天)
Hi guys, I have a cell array containing date and time (from year to millisecond). how can I manipulate the cell array so it only contains second and millisecond?

采纳的回答

David Hill
David Hill 2020-4-13
X=readmatrix(yourFile);
t=datetime(X,'InputFormat','yyyy-MM-dd HH.mm.ss.SSSSSS','Format','ss.SSSSSS');
  1 个评论
Fan Yang
Fan Yang 2020-4-13
I kind of figured out myself with a different approach. I looped over each row and convert rach row to a charactor array. I then cut off the unwanted charactors using column index since each charator is it own column now, but yours are much simpler.
Best,
Fan

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time Series Objects 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by