1x1 datetime cells into plot

12 visualizaciones (últimos 30 días)
Ercan
Ercan el 21 de Oct. de 2022
Comentada: Walter Roberson el 21 de Oct. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (1)

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

Iniciar sesión para comentar.

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by