emm, here i updated my problem because some issues have been solved by trying.
here is my code
s = {'RSN1','RSN2','RSN3'};
for i = 1:3
fileID(i) = fopen([s{i},'.txt'],'w');
fprintf(fileID(i),'%d',i);
fclose(fileID(i));
end
in this way, one can create a series of txt files with pre-defined name.
a problem is how to pre-allocate fileID for its value will be changed within a for loop.
anyway, if you have any other better way to create a series of files with specified names,
pls indeed tell me.
by the way, the syntax
fileID(i) = fopen([s{i},'.txt'],'w');
can not be found in MATLAB documentations, but it works with no warning or errors,
why?
thank you!