for文を使ったテキストファイルの更新
Afficher commentaires plus anciens
初心者です。開いたファイルに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まで書けるようにしたいのですが、どうすればよろしいでしょうか。
ご助言お願い致します。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur スクリプト dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!