for文を使ったテキストファイルの更新
Show older comments
初心者です。開いたファイルにfor文を使って数字を追加しようと思うのですが、
やり方が自力でできません。
for 1:10;
F1 = max(x1(:,jj));
fileID = fopen('1.txt','w');
fprintf(fileID,'%5d\n',F1)
end
これで実行しているのですが、最後の10しか1.txtに入力されません。
1.txtに1,2,3,4・・・10まで書けるようにしたいのですが、どうすればよろしいでしょうか。
ご助言お願い致します。
Accepted Answer
More Answers (0)
Categories
Find more on スクリプト in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!