Info
此问题已关闭。 请重新打开它进行编辑或回答。
Seperate Matlab data for my text file
1 次查看(过去 30 天)
显示 更早的评论
I have data where the year and month are stuck together, as seen 180001, should be 01 1800, how do I seperate that?
0 个评论
回答(1 个)
Bhaskar R
2020-1-20
编辑:Bhaskar R
2020-1-20
Suppose your data in the variable data
data_in_time = datetime(num2str(data(:,1)), 'Format', 'yyyyMM');
data_in_time.Format = 'MM-yyyy';
If you want data in double class instead of datetime
data_in_double = datevec(data_in_time);
% then get the repective column accordingly(years/months)
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!