MATLAB: How to change HH:MM:SS string data to HH.MM.SS

cellstringvector

Hello,
I want to change HH:MM:SS from string file to digital file (HH.MM.SS). I found this types of codes.
t=time(1,1);
[~,~,~,~,MN,S] = datevec(t);
MN*60+S
newtime2 = [MN S]
But i have a vector with 2 columns :
0 30
0 50
1 10
etc…
I want to assemble the 2 columns in juste one to have this :
0.30
0.50
1.10
Thank you

Best Answer

>> [~,~,~,~,MN,S] = datevec([now;now-pi])
MN =
10
46
S =
22.414
28.810
>> MN+S/60 % makes mathematical sense
ans =
10.374
46.480
>> MN+S/100 % what you asked for
ans =
10.224
46.288