Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Start MATLAB in headless mode: <code>matlab -noFigureWindows</code></p> <blockquote> <p>MATLAB is running in headless mode. Figure windows will not be displayed.</p> </blockquote> <p>then simply plot and save the figures as usual (you won't see any graphical output of course). Example:</p> <pre><code>surf(peaks); print output.eps %# SAVEAS works as well close </code></pre> <p>I tested the above on a Windows machine running R2010a. I don't have access to a Unix machine right now, but I answered a <a href="https://stackoverflow.com/questions/1853259/save-matlab-invisible-plot-under-terminal-as-an-image-with-same-size/1853388#1853388">similar question</a> in the past, and it worked just fine at the time (you will need to unset the <code>$DISPLAY</code> variable before starting MATLAB)</p> <hr> <p><strong>EDIT</strong></p> <p>Another option, in case you want to keep your normal workspace, is to start a new MATLAB instance in the background which will generate and save the plots (<a href="http://www.mathworks.com/support/solutions/en/data/1-6JCIN2/?solution=1-6JCIN2" rel="nofollow noreferrer">source</a>).</p> <p>Run this from the command prompt of your current MATLAB session (all on the same line):</p> <pre><code>!start /B /MIN matlab -noFigureWindows -automation -r "cd('c:\yourpath'); myscript; quit" </code></pre> <p>This will start a new MATLAB session in the background (using COM Automation), and execute a script called <code>myscript</code> (a simple M-file) that contains all your plotting code:</p> <h3>c:\yourpath\myscript.m</h3> <pre><code>surf(peaks); saveas(gcf, 'output.eps'); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload