用print函数:
如:t=1:100
plot(t,sin(t));
print(gcf,'-dpng','sin.png');
用saveas()
如:t=1:100;
plot(t,sin(t));
saveas(gcf,'my_picture.bmp','bmp');
print('-depsc','-tiff','-r300','picture1.eps')
%满足dpi的要求
saves the current figure at 300 dpi, in a color Encapsulated
PostScript file named picture1.eps. The -tiff option creates a 72
dpi TIFF preview, which many word processor applications can
display on screen after you import the EPS file. This enables you
to view the picture on screen within your word processor and print
the document to a PostScript printer using a resolution of 300
dpi.