Good,
I have a program that runs in a loop and I need to save the results of each loop . Within the loop I call various functions and in each function I need to save the results.
I have used in each function something of the type:
fid = fopen('file.txt','a+');
fprintf(fid,'CoF Inícial: %5.5f \n',mib);
fprintf(fid,'CoF Final: %2.5f \n',min(miBPT));
fclose(fid);
It has saved in the file file.txt
, but it has saved one line of information in front of the other, which makes it very difficult to read.
The \n
command works only in the matlab environment not when saving the file.
How could I save in column format?