Could someone tell me the mistake I'm making?

2 Kommentare

Torsten
Torsten am 19 Jul. 2021
What error message do you get ?
Cristian Segura Bidermann
Cristian Segura Bidermann am 19 Jul. 2021

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Sameer Pujari
Sameer Pujari am 19 Jul. 2021

1 Stimme

try this
fileID = fopen('AwesomeFile.txt','w');
fprintf(fileID,'Matlab is awesome!');
fclose(fileID);
Cris LaPierre
Cris LaPierre am 19 Jul. 2021

0 Stimmen

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

2 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Manage Products finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by