1x1 datetime cells into plot

4 views (last 30 days)
Ercan
Ercan on 21 Oct 2022
Commented: Walter Roberson on 21 Oct 2022
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?

Accepted Answer

Walter Roberson
Walter Roberson on 21 Oct 2022
Thethis_Time = [yourCell{:}];
No need to convert to datenum.
  2 Comments
Ercan
Ercan on 21 Oct 2022
Edited: Ercan on 21 Oct 2022
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 on 21 Oct 2022
Either
Thethis_Time = [yourCell{:}] .';
or
Thethis_Time = vertcat(yourCell{:});

Sign in to comment.

More Answers (1)

David Hill
David Hill on 21 Oct 2022
Convert to datenum to plot.
for k=1:length(yourCell)
t(k)=datenum(yourCell{k});
end
  2 Comments
Ercan
Ercan on 21 Oct 2022
Thank you David.
However, it doesn't seem to work.
David Hill
David Hill on 21 Oct 2022
Attach yourCell.m file

Sign in to comment.

Categories

Find more on Dates and Time in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!