Convert time to datenum
古いコメントを表示
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 件のコメント
Guillaume
2019 年 3 月 25 日
Why not use datetime instead of datenum? It's more flexible and more reliable.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Time Series Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!