Sequence save of .dat files in matlab -
I try to save each stage results in sequence format. I.e. Part of the code that generates the sequence name: Any body has suggested to me how to save these files so that it is written under its own name. As the code shows the correct name but save it wrong You have to change: to cm_clusters_2_00001.dat cm_clusters_2_00002.dat cm_clusters_2_00003.dat . "Particles_file_name" shows the required filename in the correct format, but when he saves that file, he writes "particles_file_name" and that is why I have my own results I am writing under the name of the name.
for KK = 1:20 (kk> <10) file_number = ['0000' int2str (kk) )]; Otherwise (kk> = 10 & amp; amp; amp; amp; amp; amp; amp; amp;; 1,0 & amp; nbsp; 100) file_number = ['000' int2str (kk)]; Ethef (K> = 100 & amp; amp; amp; amp; kk; lt; 1000) file_number = [ '00' int2str (kk)]; Athiff (KK> = 1000 & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; nbsp; amp; amp; nbsp; -0000) File_number = ['0' int2str (kk)]; End particle_file_name = ['cm_clusters_2_' file_number '.dat']; Save ('particles_file_name');
particles_file_name = ['cm_clusters_2_' file_number '.dat'];
save ('particles_file_name')
(particle_file_name) < P>
particle_file_name with your variable, by renaming the file, you have to send it directly to the
save command whatever you are typing string
'particles_file_name' , which has no variation with variable
particle_file_name .
Comments
Post a Comment