How to read char '00013' as 13 or '00717' as 717 ? How to skip zero pad ?
1 次查看(过去 30 天)
显示 更早的评论
How do i read a zero padded number into an integer ?
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!