I have a loop like this:
for i=1:no
%some calculations
fid = fopen( c:\out.txt , wt );
%write something to the file
fclose(fid);
end
I want data to be written to different files like this:
- for
i=1
, data is written toout1.txt
- for
i=2
, data is written toout2.txt
- for
i=3
, data is written toout3.txt
- etc.
Doing out + i
does not work. How can this be done?