zoukankan      html  css  js  c++  java
  • Simulink仿真入门到精通(六) Simulink模型保存为图片

    6.1 截图保存方式

    Ctrl+Alt+A

    6.2 拷贝视图方式

    Edit→Copy Current View to Clipboard

    6.3 saveas函数

    用于保存figure或者simulink框图。

    saveas(h,'filename.ext')%直接将句柄h所表示的对象保存到filename.ext文件中
    saveas(h,'filename','format')%将句柄h所表示的对象以format的格式保存到名为filename的文件中
    后缀名 格式说明 后缀名 格式说明
    ai Adobe Illustrator pbm Portable bitmap
    bmp Windows位图 pcx Paintbrush 24位(不支持Simulink模型)
    emf Enhanced metafile pdf Portable Document Format
    eps EPS Level 1 pgm Protable Graymap
    fig MATLAB图像(不支持Simulink模型) png Portable Network Graphics
    jpg JPEG image(不支持Simulink模型) ppm Protable Pixmap
    m MATLAB file(不支持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'。

  • 相关阅读:
    内置函数二
    内置函数一
    生成器
    迭代器相关
    再遇函数
    使用Ant搭建Android开发环境入门
    iOS GameCenter 接入
    手游充值-如何对付淘宝代充店
    分析苹果代充产业链 汇率差+退款造就三线城市千万富翁‍_中新游戏研究_Joynews中新游戏
    iOS消息推送机制的实现
  • 原文地址:https://www.cnblogs.com/dingdangsunny/p/12246237.html
Copyright © 2011-2022 走看看