Cette page appartient aux archives web de l'EPFL et n'est plus tenue à jour.
This page belongs to EPFL's web archive and is no longer updated.

Nicolaus Correll

Exporting Figures automatically from Matlab
Pierre Roduit just made an interesting small script to export in eps and png
directly from a script. very usefull for saving figures for latex...


%print someting in figure 1
%save the figure one into filename.eps (-despsc for eps color, -dpng for
print -depsc -f1 filename %

% more complicate : make the filename from 2 strings destname +
'-T2_normelized' and save in png and eps

eval(sprintf('print -depsc -f1 %s;',[destname '_T2_normelized']));
eval(sprintf('print -dpng -f1 %s;',[destname '_T2_normelized']));
Posted by Nicolaus Correll at 16:57