Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一列有 24 个值00, 01, 02, .... , 23。
00, 01, 02, .... , 23
在 MATLAB 中转换为00:00, 01:00, 02:00, 03:00 ... 23:00.
00:00, 01:00, 02:00, 03:00 ... 23:00
尝试:
vals = cellstr(num2str((0:23)','%02d')); vals = strcat(vals, ':00');
>> t = (0 : 23) / 24; >> s = datestr(t, 'HH:MM');