for文を使って連番のテキストファイルに書き込む
이전 댓글 표시
for文を使って以下のexp.txtを"1.txt、2.txt、3.txt"のように連番で書き込みが
できるようfopenしたいと考えています。
fileID = fopen('exp.txt','w');
何か良い方法はないでしょうか。
具体的には下記のFileIDを連番にしてfor以下の内容を書き込みたいです。
fileID = fopen('exp.txt','w');
for j = 3:7:38
F = x6(:,j);
F1 = max(F)
fprintf(fileID,'%6.2f\n',F1);
end
fclose(fileID);
ご助言の程宜しくお願い致します。
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 低水準ファイル I/O에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!