Info
此问题已关闭。 请重新打开它进行编辑或回答。
How can I convert a char into numbers
1 次查看(过去 30 天)
显示 更早的评论
if i have a char of numbers at a point in a cell .... say 123519. how can i change it into numbers(its actually a time). how can i then write the numbers in hr:min:sec format so that i have 12:35:19... is there a simpler way I can get that same format?
0 个评论
回答(1 个)
Walter Roberson
2015-11-6
mycell = {'123519', '123525', '041148'}
result = regexprep(mycell, '(\d\d)(\d\d)(\d\d)', '$1:$2:$3');
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!