フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can I convert a char into numbers

1 回表示 (過去 30 日間)
me
me 2015 年 11 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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?

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 11 月 6 日
mycell = {'123519', '123525', '041148'}
result = regexprep(mycell, '(\d\d)(\d\d)(\d\d)', '$1:$2:$3');

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by