Convert time to datenum
Mostra commenti meno recenti
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 Commento
Guillaume
il 25 Mar 2019
Why not use datetime instead of datenum? It's more flexible and more reliable.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Time Series Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!