Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6953607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:30:03+00:00 2026-05-27T14:30:03+00:00

I’d like to create a PDF out of my matlab m-function. The PDF should

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:30:04+00:00Added an answer on May 27, 2026 at 2:30 pm

    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

    1. This is the way I’ve come to do it after years of experience and it always gives me the best results
    2. Every one of my colleagues does it this way for the same reason
    3. The results will be completely reproducible
    4. You’re using Matlab to do what it’s good at (making scientific figures) and latex to do what it’s good at (formatting documents)

    The Matlab code to make the eps of the figure would be like this (supposing your figure is figure 1):

    print -depsc2 -f1 -loose my_fig.eps
    

    You could pretty easily write a latex template that uses my_fig.pdf and then run everything from your Matlab using bangouts:

    !epstopdf my_fig
    !pdflatex mydoc.tex
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I have a text area in my form which accepts all possible characters from
I want to construct a data frame in an Rcpp function, but when I
I have some data like this: 1 2 3 4 5 9 2 6
I would like to count the length of a string with PHP. The string
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.