How to convert time in milliseconds to hour, minutes format?
조회 수: 41 (최근 30일)
I want to convert time in millisecons format to hour, minutes format using matlab 2013b. I used the following code to convert milliseconds to seconds;
% Here 'time' is a matrix in milliseconds format. It can be found in the
% attacement. The output matrix 'time_seconds' contains time in seconds.
To convert the time in seconds to hour, minute format, I tried the following code from
s = seconds(time_seconds);
s.Format = 'hh:mm';
After execution of the first line in the above two lines code, I got an error message;
Error using datevecmx
The datevecmx function only accepts double arrays.
Error in datevec (line 301)
y = datevecmx(t);
Error in second (line 46)
c = datevec(d(:));
Any help in solving this problem will be appreciated.