フィルターのクリア

How do I write to a .txt file?

2 ビュー (過去 30 日間)
Jake
Jake 2014 年 1 月 25 日
回答済み: Walter Roberson 2014 年 1 月 25 日
I need to write to a .txt file.
Thank you for your help.

回答 (2 件)

Walter Roberson
Walter Roberson 2014 年 1 月 25 日
fid = fopen('YourFile.txt', 'wt');
fprintf(fid, 'Jake said: %f\n', sqrt(1:10));
fclose(fid);

G PRAKASH
G PRAKASH 2014 年 1 月 25 日
use dlmwrite command
I=magic(10); dlmwrite('file.txt',I)

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by