Search code examples
matlabgraphicssimulink

Save Scope Graphic of Simulink Model


I'm using simulink of Matlab R2012b. When I finish generating my model, I want to save the graphics obtained from it that are seen in the scope, but I can't find an easy way to do this. Does exist a way to save the graphics that I'm obtaining from the model that are seen in the scope?


Solution

  • The long way to do this is, before running the model, go to the terminal of matlab, and enter the next lines:

    >>>shh = get(0,'ShowHiddenHandles');
    >>>set(0,'ShowHiddenHandles','On')
    >>>set(gcf,'PaperPositionMode','auto')
    >>>set(gcf,'InvertHardcopy','off')
    >>>saveas(gcf,'mypic.jpg')
    >>>set(0,'ShowHiddenHandles',shh)
    

    And the file will be saved in the current folder where you are working.

    The other way is doing a screenshot, and then pasting it on a program like paint or inkscape.