How to create a .txt file in matlab to report mt output

1 回表示 (過去 30 日間)
Ga Ma
Ga Ma 2020 年 4 月 8 日
コメント済み: Ga Ma 2020 年 4 月 8 日
Now, I have 5 outputs and i want to create a .txt file to report my outputs. The content should be these 5 sentences. How can i do that?

採用された回答

Geoff Hayes
Geoff Hayes 2020 年 4 月 8 日
From fprintf, use fopen to create (or open) a file and write to it as
fid = fopen('myDataFile.txt', 'w+');
fprintf(fid, 'The price of N a is %f\n', A);
% etc.
fclose(fid);
  1 件のコメント
Ga Ma
Ga Ma 2020 年 4 月 8 日
It works, thank you very much!! Have a nice day!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStandard File Formats についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by