MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   关于int2str (https://www.labfans.com/bbs/showthread.php?t=5089)

snn188 2008-10-31 18:40

关于int2str
 
for d = 1:31
s = ['August' int2str(d) '.dat'];
load(s)
% Code to process the contents of the d-th file
end
为什么我执行这段代码的时候老是在 s = ['August' int2str(d) '.dat'];这里报错,这是matalb帮助里面的例子,那个大哥帮一下忙

:cry:

meteora1005 2008-11-01 00:25

回复: 关于int2str
 
改成这样肯定就好了:
s = ['August', int2str(d), '.dat'];
这样才能把三部分合成一个字符串。


所有时间均为北京时间。现在的时间是 14:19

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