Save entire Simulink model by MATLAB command

Hi, Simulink supporters team
I want to print my Entire model as pdf by MATLAB script instead of By Print Option in Simulnik Toolstrip. I have tried 2 ways:
1.Using print( ) function but it only print first page of my model
2. Using exportgraphics( ) but it does not support for Simulink model.
So, is there any way to solve this problem?

답변 (2개)

Mathy
Mathy 2024년 8월 9일

0 개 추천

Hi Ann,
In order to ensure that the model is entirely contained in the paper while using the available space on the paper, try the following steps:
  • To help with visually verifying if the paper size is being changed by the next step, first enable the "Show Page Boundaries" option by navigating through "File --> Print --> Show Page Boundaries". This will show the model in reference to the currently selected paper size by changing the extra model canvas to gray.
  • In Simulink, select the model or subsystem you want to print. Then, in the MATLAB command prompt, execute the following command:
>> set_param(gcs,'PaperType','tabloid','PaperPosition',[x y w h],'PaperOrientation','landscape');
I hope this helps!
arushi
arushi 2024년 8월 9일

0 개 추천

Hi Ann,
You may refer to the following documentation on "saveas" function for saving the model through a MATLAB script -
Hope this helps.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

Ann
2024년 8월 9일

답변:

2024년 8월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by