How to save a Simulink scope as a .fig file without opening it (Command Window code)?

26 ビュー (過去 30 日間)
Cory Dinkle
Cory Dinkle 2021 年 11 月 18 日
回答済み: Salman Ahmed 2021 年 12 月 31 日
Title says it all. I have a Viewer in Simulink that I would like to save as a .fig file. I'd like to do this by running a quick function in the Command Window (if possible), and to save it without opening it. I know how export Viewers to Figures through the Viewer browser, and to then save from the Figure browser, I'm just hoping to be able to write a function that will do this, as I have many Viewers and it's very time consuming.

回答 (1 件)

Salman Ahmed
Salman Ahmed 2021 年 12 月 31 日
Hi Cory,
From what I understand, you wish to export the scope viewer to a figure. There is no direct function for doing this, however, as a workaround, you can get the handle to the scope figure and save the figure as a jpeg image by executing the commands at this link.


Find more on Printing and Saving in Help Center and File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by