How can I display ans in a generated PDF?

I'm doing a MatLab project for a class, and we're supposed to generate a PDF from our m files that show the output of our code. I've tried generating a PDF, and it will display the graphs I make, but the answers to expressions don't show up. For example, in the Command Window, if I type 5*8, ans = 40 will appear. However, in the generated PDF, it would only show 5*8 without showing the output. I tried setting "Evaluate code" to true in the publishing settings, but that didn't help.
If it's relevant, I've declared some vectors and am trying to have the PDF display the results when I dot and cross them.
Any suggestions are greatly appreciated. Thank you!

 Réponse acceptée

madhan ravi
madhan ravi le 6 Nov 2018
Modifié(e) : madhan ravi le 6 Nov 2018

2 commentaires

I tried this by typing
publish('MatLab2','pdf')
However, the generated PDF still didn't show the results of my operations. Is there a parameter to publish that I'm missing?
madhan ravi
madhan ravi le 6 Nov 2018
Modifié(e) : madhan ravi le 6 Nov 2018
'MatLab2.m'
If it doesn’t work see the links I provided

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Report Generator dans Centre d'aide et File Exchange

Produits

Version

R2018b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by