I have a .dpj file which is in fact a normal .txt file. I would like to open, change a number, save under a specific name and close the file all within a for loop without loosing the basic file.
My question is how I can do this for example if the number is standing in the line 100 of the text file behind KLEFF?
The filename under which I want to save the .dpj file should be numbered depending on the for loop.
By myself this part works except that the .dpj files are not readable anymore:
N=10;for i=0:N; baseline_name='textfile'; filename=[baseline_name,'_',num2str(i)]; savename=strcat(char(filename),'.dpj'); save (savename);end
Many thanks in advance!
Best Answer