1x1 datetime cells into plot

12 次查看(过去 30 天)
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
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?
Walter Roberson
Walter Roberson 2022-10-21
Either
Thethis_Time = [yourCell{:}] .';
or
Thethis_Time = vertcat(yourCell{:});

请先登录,再进行评论。

更多回答(1 个)

David Hill
David Hill 2022-10-21
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by