How do I publish high-quality, well-scaled figures and output to a PDF?

25 Ansichten (letzte 30 Tage)
I have a script that generates screen output and a bunch of figures. I wish to generate a PDF report which consists of the console output and high quality (well-scaled) figures. Now, I've been able to generate the console output + low-quality (not well scaled) images using the 'publish' command. I have also been able to save well-scaled version of each figure as a separate PDF using the print('-fillpage'..) command. Is there a way in which I can:
a) suppress printing of figures in the publish command
b) concatenate all PDFs together after the console output and high quality images have been printed
c) print to the console output at the same time as publish is being executed

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 24 Okt. 2019
The best solution to all your concerns would probably be to use MATLAB's Report Generator:
Report Generator creates customizable reports out of MATLAB functions. It makes it easy to save high-quality, well-scaled figures and output to a PDF, MS Word, HTML, RTF or XML document.
Here are two examples of simple workflows with Report Generator, one interactive and one programmatic:
If you are unable to switch to Report Generator, consider the following answers to your questions about the "print" function:
a) To suppress output while publishing, go to the output preferences for publishing" and set the "Evaluate Code" option to "false"
b) Report Generator makes it easy to insert high-quality images directly into your PDF. With "print" this is a bit more tricky. You will probably have to do this work outside of MATLAB. For example, you can export your figures as PDF's or JPEG's, then copy these images into a Word document that you format yourself. Though, if you need to append PDFs _within _MATLAB, check out the following method from File Exchange for concatenating PDF documents:
c) As in question (a), I would edit the "Evaluate code" option under the publishing output preferences.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Report Generator finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by