MATLAB の writetable​関数を使用して、既存​のテキストファイルに​テーブルを追記できま​すか?

既存のテキストファイルの最後の行の後段に、別のテーブルデータを writetable 関数を使って追加することができるか、教えてください。writetable 関数を実行すると、上書きされてしまうようです。

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 2 Mai 2022
Modifié(e) : MathWorks Support Team le 2 Mai 2022

0 votes

MATLAB R2020a 以降のリリースでは、writetable 関数の "WriteMode" オプションを ”append” にすることでファイルの最終行に追記することができます。例)
writetable(T,'filename.txt','WriteMode','append')
このオプションは、writecell、writetimetable、writematrixでも使用できます。

Plus de réponses (0)

Catégories

Produits

Version

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!