Printing live script without code part

50 vues (au cours des 30 derniers jours)
alpedhuez le 8 Juil 2018
Commenté : Daniel Holstein le 25 Sep 2019
Is it possible to print a live script file without code so that readers can get output and graphics (but not code)?

Réponses (2)

Kevin Chng
Kevin Chng le 27 Mar 2019
In 2019a, it allows you to hide the code before exporting.
  1 commentaire
Daniel Holstein
Daniel Holstein le 25 Sep 2019
Is there a way to show some code sections, but not others? I am a professor, and sometimes I want to give a code snippet as an example, and then show (for example) a plot I want students to replicate, but I don't want to give them the answer... Thanks!

Connectez-vous pour commenter.

Yash Trivedi
Yash Trivedi le 9 Juil 2018
The ' publish ' method allows the user to generate a view of the MATLAB file in a specified format. You could publish a file in the HTML or PDF format and then print the published file. The method allows the user to specify a 'showCode' option which is set to true by default but can be set to false. If set to false, it won't include the code in the published file.
Refer to the following documentation for the proper syntax -


En savoir plus sur MATLAB Report Generator dans Help Center et File Exchange



Community Treasure Hunt

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

Start Hunting!

Translated by