matlabfrag to pdf

Version (2.98 KB) by Martin
Small script using matlabfrag to create a latex formatted pdf file.
Updated 14 Sep 2010

View License

Based on plotpdftex

Calls matlabfrag to create the *.eps and *.tex Files. After that pdflatex is used to create the pdf File.


mlf2pdf creates the PDF file of the current graphical figure (CGF)
named LaTeXfile.pdf

mlf2pdf(H) creates the PDF file from the graphical figure with
handle H, named LaTeXfile.pdf

mlf2pdf(H,FILENAME) creates the PDF file from the graphical figure
with handle H, named FILENAME.PDF (FILENAME is a character array of
the filename, with or without the extension .PDF)

mlf2pdf(H,FILENAME,PACKAGES) to adding
packages such as fonts, mathfont,...
ex: PACKAGES = 'amssymb, times'

It now supports Windows AND Unix Systems.

Cite As

Martin (2024). matlabfrag to pdf (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Printing and Saving in Help Center and MATLAB Answers

Inspired by: PlotPdfTex, matlabfrag

Inspired: latexfigure

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

+ added UNIX Support
+ included an example

mlf2pdf ignored the figure handle. Should work now.

added acknowledgements