AlexCrosse
Computer
- Jul 22, 2005
- 1
This is probably a silly question but I am going to ask it anyway...
I have written some code that puts out an array to file, however Matlab seems not to be able to recognise the line break command ('\n') hence prints out all the data in one long line rather than as a table. Instead of a new line I get a small box character instead. I think my code is correct and the tab command ('\t') works fine.
I was wondeing whether this was a problem with Matlab or a problem with the OS and in either case how it could be fixed.
I am running Matlab 7 on a windows 2000 machine. The code section is printed below:
shunt_level_data = shunt_level_data.';
filename_out = ['TC1_' date '_shuntlevels_out.txt'];
fid_out = fopen(filename_out,'w');
count = fprintf(fid_out, '%2d\t%2d\t%2d\t%2d\t%2d\t%f\t%f\t%f\n', shunt_level_data);
status = fclose(fid_out);
I have written some code that puts out an array to file, however Matlab seems not to be able to recognise the line break command ('\n') hence prints out all the data in one long line rather than as a table. Instead of a new line I get a small box character instead. I think my code is correct and the tab command ('\t') works fine.
I was wondeing whether this was a problem with Matlab or a problem with the OS and in either case how it could be fixed.
I am running Matlab 7 on a windows 2000 machine. The code section is printed below:
shunt_level_data = shunt_level_data.';
filename_out = ['TC1_' date '_shuntlevels_out.txt'];
fid_out = fopen(filename_out,'w');
count = fprintf(fid_out, '%2d\t%2d\t%2d\t%2d\t%2d\t%f\t%f\t%f\n', shunt_level_data);
status = fclose(fid_out);