How to read char '00013' as 13 or '00717' as 717 ? How to skip zero pad ?

1 visualización (últimos 30 días)
RuiQi
RuiQi el 10 de Dic. de 2016
Respondida: dpb el 10 de Dic. de 2016
How do i read a zero padded number into an integer ?

Respuestas (1)

dpb
dpb el 10 de Dic. de 2016
>> str2num('00013')
ans =
13
>>
Or any of the other ways to parse data; sprintf or any of the other i/o functions depending upon where the string is located.

Categorías

Más información sobre String Parsing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by