new line

5 次查看(过去 30 天)
stephanie borg
stephanie borg 2011-3-29
So i want to write information in a text file annd this is my code
fid=fopen('simulation.txt', 'a');
fprintf(fid,'\n');
fprintf(fid,'%s\n ','injection moulding ');
fprintf(fid,'% g\n ',y);
fprintf(fid,'% g\n ',x);
fprintf(fid,'\n');
fclose(fid);
however it is not skipping a line between each one. what am i doing wrong?

采纳的回答

Walter Roberson
Walter Roberson 2011-3-29
You might try using 'at' instead of 'a' when you fopen().

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Electrophysiology 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by