matlab do not show any figures

Sometimes you don't want to display figures or plots within matlab, e.g. if running matlab with the -nodesktop flag on a remote machine, e.g.

matlab -nodesktop

Include following lines in your code or paste it in the matlab command window to disable the figures:

set(0,'DefaultFigureVisible','off');

Sometimes it is also good to include

warning('off','all');

to suppress all warnings, e.g. when using the function 'waitbar'. Otherwise your screen is spamed with the warning:

Warning: waitbar is no longer supported when MATLAB is started with the -nodisplay or -noFigureWindows option or there is no display

blog_tags: 

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <img> <br> <p> <span>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Use [collapse] and [/collapse] to create collapsible text blocks. [collapse collapsed] or [collapsed] will start with the block closed.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Code snippets in <code>...</code> or <source>...</source> automatically will be pretty printed.
  • Use [collapse] and [/collapse] to create collapsible text blocks. [collapse collapsed] or [collapsed] will start with the block closed.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Target Image