cell array manipulation and cell array conversion

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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeNonlinear Regression についてさらに検索

製品

リリース

R2019a

タグ

質問済み:

2020 年 4 月 13 日

コメント済み:

2020 年 4 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by