MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]怎么让一个整数变成001呢,并且怎么加到099? (https://www.labfans.com/bbs/showthread.php?t=2154)

wangchao6639 2008-04-09 14:39

[求助]怎么让一个整数变成001呢,并且怎么加到099?
 
比如我要输入i=1,出来的是i=001,而且我希望它能进行计算,加到099,哪位能帮一下,谢谢

shiqiang 2008-04-09 14:56

fprintf('x=%03d',x)。输出时用这种格式化就可以了。


所有时间均为北京时间。现在的时间是 11:04

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.