How to add data to an existing txt file which already contains some lines ?

37 ビュー (過去 30 日間)
How to add data to an existing txt file which already contains some lines ?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 8 月 6 日
a=[1 2 3;4 5 6]
dlmwrite('file.txt',a,'-append','newline','pc')

その他の回答 (1 件)

Stephen23
Stephen23 2015 年 8 月 6 日
編集済み: Stephen23 2015 年 8 月 6 日
Read the fopen documentation and have a look at the permission options. You will find the permission 'a' or 'a+' of particular interest.
You can use fprintf to print text to file, or one of the other text-file writing functions.

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by