Convert time to datenum
Mostrar comentarios más antiguos
I have a folder with 10 matfiles where the first row is the time and the second raw is some data associated with the time. I want to convert all the time for the first row of each of the matfiles as a new time series using datenum. I have been able to navigate to the directory of and tried this code but it isnt working. Please is can I get some help.
mat = dir('*.mat');
for i = 1:length(mat)
load(mat(i).name);
newMat = mat(i).name(1,:);
newdate = datenum(newMat);
end
1 comentario
Guillaume
el 25 de Mzo. de 2019
Why not use datetime instead of datenum? It's more flexible and more reliable.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Time Series Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!