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

조회 수: 1 (최근 30일)
RuiQi
RuiQi 2016년 12월 10일
답변: dpb 2016년 12월 10일
How do i read a zero padded number into an integer ?

답변 (1개)

dpb
dpb 2016년 12월 10일
>> 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.

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by