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 日

0 投票

You might try using 'at' instead of 'a' when you fopen().

1 件のコメント

stephanie borg
stephanie borg 2011 年 3 月 29 日
thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Entering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by