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

1 visualización (últimos 30 días)
Ga Ma
Ga Ma el 8 de Abr. de 2020
Comentada: Ga Ma el 8 de Abr. de 2020
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?

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 8 de Abr. de 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);

Más respuestas (0)

Categorías

Más información sobre Standard File Formats en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by