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!