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 (1643×1) 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!
Best Answer