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

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Geoff Hayes
Geoff Hayes il 8 Apr 2020
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);

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by