編程技巧:matlab fprintf輸出到txt文件實現換行


 
<code class="language-plain"><textarea readonly=”readonly” name=”code” class=”matlab”>   

result_file=fopen('D:\buildingdata\test0\result.txt','w+');
fprintf(result_file,'%d',1);
fprintf(result_file,'\r\n');

單純的使用‘\n’好像不行,所以查閱了資料使用上述的'\r\n'可以:

參考博文:https://blog.csdn.net/suyunyixuan/article/details/74025701

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章