Text output from script

74 visualizaciones (últimos 30 días)
Kcire L
Kcire L el 10 de Mzo. de 2021
Comentada: Walter Roberson el 10 de Mzo. de 2021
Hello,
I was wondering if there was a way to output a text report of certain values and variables from my matlab script. I am able to output a nice plot of what I am analyzing, but it woudl be nice to output some of the other details of the script in a nice report like file.
What is the best way to do this?
Thanks for any assistance.

Respuesta aceptada

David K.
David K. el 10 de Mzo. de 2021
I would look at the 'publish' capabilities. At the top of matlab, if you switch from 'Editor' to 'Publish' you can output your code and results. It does not sound like you would want code so by clicking the down arrow in the 'publish' button you can go to edit publish options. Here you can choose your output file format among other options. If you turn the 'Include' code setting to false then it will output your comments and figures.
For other details I would put instances of the disp function into the script. For example:
x = 1; y = 2; z = x*y;
disp(sprintf('The output is %d.',z));
  1 comentario
Walter Roberson
Walter Roberson el 10 de Mzo. de 2021
See also the Report Generator product.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB Report Generator en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by