Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How can I convert a char into numbers

1 visualizzazione (ultimi 30 giorni)
me
me il 6 Nov 2015
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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?

Risposte (1)

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

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by