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().

추가 답변 (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