How to split datetime vector into a numerical Matrix?
3 次查看(过去 30 天)
显示 更早的评论
Hello to everybody, my goal is to get a matrix of numbers starting from a timeseries which was created by the command "datetime".
a=datetime(1981,1,1);
b=datetime(1983,31,1);
t1=a:b;
t2=datetime(t1,'Format','yyyy-M-d');
So t2 will be a (1643x1) datetime vector in the format [1981-1-1 ; 1981-1-2 ; 1981-1-3 ;......], i'd really like to trasform that vector into a numerical matrix done in this format:
[1981,1,1 ;1981,1,2 ;1981,1,3 ;.....].
I hope that my question is clear. Thank you!
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!