int2strz.m

Same as int2str but with zero padding to the left.
2.5K 次下载
更新时间 2016/5/4

查看许可证

This is a really simple program that makes the same as int2str but pads with zeros those integers with less digits than the maximum one.
It is useful (I hope) when our program reads files with names like: xxx001.dat, xxx002.dat, ..., xxx099.dat, xxx100.dat, etc., and we don't want to make use of if's to put zeros to int2str outputs (great isn't it).

int2strz(X,N) pads up to N digits (see the screenshot).

引用格式

Carlos Adrian Vargas Aguilera (2024). int2strz.m (https://www.mathworks.com/matlabcentral/fileexchange/12973-int2strz-m), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Numeric Types 的更多信息
致谢

启发作品: daylightGMT.m

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Fixed minor bug for no numeric inputs, or a single zero.
BSD License