I’d like to create a PDF out of my matlab m-function. The PDF should contain some text information which I want to style a bit and one image (which is previously generated as figure). Is there any way? The only thing I found is publish to publish source-code. The only alternative I could think off was to programm the texts into the figure window and than export the whole figure to pdf. Perhaps there’s a better way to do it?
Thanks!
I’d like to create a PDF out of my matlab m-function. The PDF should
Share
I would recommend generating your figure with Matlab, outputting it to eps, then converting the figure to pdf using epstopdf. Then embed your figure in a latex document and generate a pdf with pdflatex.
I know this sounds like an incredibly roundabout way of doing it, but
The Matlab code to make the eps of the figure would be like this (supposing your figure is figure 1):
You could pretty easily write a latex template that uses
my_fig.pdfand then run everything from your Matlab using bangouts: