Could someone tell me the mistake I'm making?

2 件のコメント

Torsten
Torsten 2021 年 7 月 19 日
What error message do you get ?
Cristian Segura Bidermann
Cristian Segura Bidermann 2021 年 7 月 19 日

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

回答 (2 件)

Sameer Pujari
Sameer Pujari 2021 年 7 月 19 日

1 投票

try this
fileID = fopen('AwesomeFile.txt','w');
fprintf(fileID,'Matlab is awesome!');
fclose(fileID);

1 件のコメント

Cristian Segura Bidermann
Cristian Segura Bidermann 2021 年 7 月 19 日
Thank you very much !!, there it worked for me.

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

Cris LaPierre
Cris LaPierre 2021 年 7 月 19 日

0 投票

Follow the advice in the problem description - review the documentation page for fprintf. Your code is not writing anything into the file.

2 件のコメント

Cristian Segura Bidermann
Cristian Segura Bidermann 2021 年 7 月 19 日
Yes, if the code writes what is required
Cris LaPierre
Cris LaPierre 2021 年 7 月 19 日
It's printing it to the screen. It is not, however, writing it to the file 'AwesomeFile.txt'.

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

カテゴリ

ヘルプ センター および File ExchangeManage Products についてさらに検索

タグ

コメント済み:

2021 年 7 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by