Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can I convert a char into numbers

1 visualización (últimos 30 días)
me
me el 6 de Nov. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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?

Respuestas (1)

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

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by