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일
X=readmatrix(yourFile);
t=datetime(X,'InputFormat','yyyy-MM-dd HH.mm.ss.SSSSSS','Format','ss.SSSSSS');

댓글 수: 1

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 Exchange에서 Nonlinear 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