6.1截图保存方式
Ctrl+Alt+A
6.2拷贝试图方式
Edit→CopyCurrentViewtoClipboard
6.3saveas函数
用于保存figure或者simulink框图。
saveas(h,‘filename.ext‘)%直接将句柄h所表示的对象保存到filename.ext文件中
saveas(h,‘filename‘,‘format‘)%将句柄h所表示的对象以format的格式保存到名为filename的文件中
后缀名
格式说明
后缀名
格式说明
ai
AdobeIllustrator
pbm
Portablebitmap
bmp
Windows位图
pcx
Paintbrush 24位(不支持Simulink模型)
emf
Enhancedmetafile
PortableDocumentFormat
eps
EPSLevel 1
pgm
ProtableGraymap
fig
MATLAB图像(不支持Simulink模型)
png
PortableNetworkGraphics
jpg
JPEGimage(不支持Simulink模型)
ppm
ProtablePixmap
m
MATLABfile(不支持Simulink模型)
tif
压缩的TIFF图像
示例:
>> h=get_param(gcs,‘handle‘)
h =
4.0002
>> saveas(h,‘example‘,‘png‘)
多格式保存:
formats = {‘bmp‘,‘emf‘,‘eps‘,‘pbm‘,‘pdf‘,‘pgm‘,‘png‘,‘ppm‘,‘tiff‘};
name = ‘simulink_saveas‘;
for ii = 1:length(formats)
saveas(get_param(gcs, ‘handle‘),name, formats{ii});
end
6.4 print函数
>> print(‘-s‘)
>> print(‘-smymodel‘)
>> print(‘-smymodel‘,‘-dbmp‘,‘1‘)
-d支持的格式包括‘bmp‘,‘eps‘,‘pbm‘,‘pdf‘,‘pgm‘,‘png‘,‘ppm‘,‘tiff‘。
原文:/dingdangsunny/p/12246237.html