Hey guys!
I've got a 30224x1 cell data of time which shows as "1x1 datetime" in cells when I import them.
However, I can not able to plot them.
Could anyone help me to do it properly?

 채택된 답변

Walter Roberson
Walter Roberson 2022년 10월 21일

0 개 추천

Thethis_Time = [yourCell{:}];
No need to convert to datenum.

댓글 수: 2

Ercan
Ercan 2022년 10월 21일
편집: Ercan 2022년 10월 21일
Thank you Walter.
It worked perfectly. One minor thing though. Is it possible to make it in one column rather than one row?
Either
Thethis_Time = [yourCell{:}] .';
or
Thethis_Time = vertcat(yourCell{:});

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

David Hill
David Hill 2022년 10월 21일

0 개 추천

Convert to datenum to plot.
for k=1:length(yourCell)
t(k)=datenum(yourCell{k});
end

댓글 수: 2

Ercan
Ercan 2022년 10월 21일
Thank you David.
However, it doesn't seem to work.
David Hill
David Hill 2022년 10월 21일
Attach yourCell.m file

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2022년 10월 21일

댓글:

2022년 10월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by