Can you help me to display my script results in pdf file?

4 visualizaciones (últimos 30 días)
Sulaiman AL Majdub
Sulaiman AL Majdub el 21 de Oct. de 2024
Editada: Sulaiman AL Majdub el 21 de Oct. de 2024

The Script file results are tables and figures

Respuestas (1)

Jayanti
Jayanti el 21 de Oct. de 2024
Editada: Jayanti el 21 de Oct. de 2024
Hi Sulaiman,
You can use MATLAB “publish” function to convert a script into a PDF document.
Execute the below code in the MATLAB Command Window:
options = struct('format', 'pdf', 'outputDir','output_directory');
publish(scriptFileName, options);
Replace “scriptFileName with the name of your script and output_directorywith the desired directory path where you want the PDF to be saved.
Above code creates a structure named “options” that specifies the output format (pdf) and the directory where the PDF should be saved. “publish” function will takes the script specified by “scriptFileNameand the “options” structure and will generate the necessary PDF document according to those settings.
Hope this will resolve your query!

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by