当前位置:网站首页>How to save Simulink simulation model as image or PDF

How to save Simulink simulation model as image or PDF

2022-08-09 13:16:00 51CTO

simulinkModel to create good,After the simulation need for pictures or model exportpdfShare your convenience,So the need to share a bitSimulinkThe simulation model is saved as a picture orPDF的方法.

1、截图

The simplest method is to use the screenshot tool,Simulation models are directly related to the screenshots for pictures.Conventional computer screenshots tools orqq、WeChat take screenshot,比如微信Alt+A,QQ快捷键为Ctrl+Alt+ACan choose to screen area can be copied to the document after

保存SimulinkThe simulation model for images orPDF的方法_快捷键

2、print pdf

可以使用SimulinkOwn to print the output forPDF形式.具体步骤如下:In the simulation model of the menu barSIMULATION中选择Print,后选择Print to之后再选择ALL printAfter click print to go.也可使用快捷键Ctrl+P直接打印,The default generation and model file of the same namepdf文件,保存的pdf清晰度不错,pdfThe content of the method can take module also export,比较方便

保存SimulinkThe simulation model for images orPDF的方法_快捷键_02

保存SimulinkThe simulation model for images orPDF的方法_句柄_03

保存SimulinkThe simulation model for images orPDF的方法_微信_04

保存SimulinkThe simulation model for images orPDF的方法_快捷键_05

3、simulink截图工具

使用SimlinkOwn similar screenshots tools,具体在format下有一个Screenshot,选择send bitmap to clipboard,In a document copying in later can,

注:This way the picture resolution is low.

保存SimulinkThe simulation model for images orPDF的方法_微信_06

保存SimulinkThe simulation model for images orPDF的方法_微信_07

4、saveas命令

Using the command line directly save to the corresponding format,用于保存figure或者simulink框图.

      
      
saveas(h,'filename.ext')%Will handle directlyhThe object of said "save tofilename.ext文件中saveas(h,'filename','format')%将句柄hRepresented by object toformatThe format of calledfilename的文件中
  • 1.

保存SimulinkThe simulation model for images orPDF的方法_句柄_08

      
      
>> h=get_param(gcs,'handle')
h =
1.0130e+03
>> saveas(h,'model.png','png')
  • 1.
  • 2.
  • 3.
  • 4.

保存SimulinkThe simulation model for images orPDF的方法_句柄_09

注;Using this method need to open the model can be,不然会报错.This kind of mode selectionpng或bmpDefinition of the format is higher than the other methods.

At the same time save multiple format

      
      
formats = {'bmp','emf','pbm','pdf','pgm','png','ppm','tiff'};name = 'simulink_saveas';for ii = 1:length(formats) saveas(get_param(gcs, 'handle'),name, formats{ii});end
  • 1.

保存SimulinkThe simulation model for images orPDF的方法_快捷键_10

保存SimulinkThe simulation model for images orPDF的方法_微信_11


如果是子模块,Attention to selected into the sub module,然后执行上面的命令

保存SimulinkThe simulation model for images orPDF的方法_快捷键_12

保存SimulinkThe simulation model for images orPDF的方法_微信_13


原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208091152354965.html