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

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

Accepted Answer

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

More Answers (0)

Categories

Find more on Text Data Preparation in Help Center and File Exchange

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!