title: Export Matlab figure as PNG?
body: <p>I need to automatically export figures from Matlab to PNG. My figure has a size of 600x200 px:</p>
  
  <pre><code>hFig = figure(1); 
  set(hFig, 'Color', [1 1 1]); % backgroundcolor white
  set(hFig, 'Position', [500 500 600 200]) % size 600x200
  </code></pre>
  
  <p>I tried e.g. </p>
  
  <pre><code>print -dpng image.png
  </code></pre>
  
  <p>but the image.png is larger than 600x200 px. Exporting the figure manually from the Figure Window GUI using the "save" button works great, I want to do exactly this automatically / from a script. Thanks for any hint!</p>