>t = linspace(0,2*pi,100)';
>tic;print -dpng "-S560,420" fig_print.png;toc
>I could not find any differences between both files (fig_print.png and fig_imwrite.png).
From the getframe definition:
Without an argument, capture the current axes excluding ticklabels,
title, and x/y/zlabels. The returned structure FRAME has a field
So once you add (for example) a title you should see the difference.
>However imwrite is much faster than print
That's interesting and may be useful when saving many images.
>1) Is imwrite always faster than print ?
Probably: print does much more
>2) Is there any situation where one command should be used instead of the other one?
print is for general use, imwrite only creates bitmap files from a
single plot with the above limitations
Francesco Potortì (ricercatore) Voice: +39.050.621.3058
ISTI - Area della ricerca CNR Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti
(gate 20, 1st floor, room C71) Web: http://fly.isti.cnr.it