Re: to print string and number



Jérôme wrote:


Hi,

j=3
for i = 2:4
fprintf('N %d REMLINL %d %d.0000 (1374)\n',j,i,i)
end

many thanks!!!

for the following output

N 1 WN C:\ksei_pairpath1.mat 4 (1374)
N 2 WN C:\ksei_pairpath2.mat 4 (1374)
N 3 WN C:\ksei_pairpath3.mat 4 (1374)

I tried the following code,

for i = 1:3
fprintf('N %d WN C:\\Flowcapacitydir\\ksei_pairpathi.mat 4
(1374)\n',i)
end

how can we let i attach with the file name? thanks again.
.