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!