matlab中fprintf寫入txt文件\n沒法換行

  解決方法,將‘\n’換成’\r\n’,實現以下:web fp = fopen(save_train_txt,'w+'); %open the txt fprintf(fp,'hello world!\r\nhello china!'); fclose(fp);
相關文章
相關標籤/搜索