필터 지우기
필터 지우기

cell array manipulation and cell array conversion

조회 수: 1 (최근 30일)
Fan Yang
Fan Yang 2020년 4월 13일
댓글: Fan Yang 2020년 4월 13일
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에서 Structures에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by