cell array manipulation and cell array conversion

2 visualizaciones (últimos 30 días)
Fan Yang
Fan Yang el 13 de Abr. de 2020
Comentada: Fan Yang el 13 de Abr. de 2020
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?

Respuesta aceptada

David Hill
David Hill el 13 de Abr. de 2020
X=readmatrix(yourFile);
t=datetime(X,'InputFormat','yyyy-MM-dd HH.mm.ss.SSSSSS','Format','ss.SSSSSS');
  1 comentario
Fan Yang
Fan Yang el 13 de Abr. de 2020
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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by