How can I verify from the MATLAB Command Window if my Simulink has been modified?

11 views (last 30 days)
The modification of a Simulink model is visible by the star(*)-sign at the right-side of the model name. When the Simulink model is modified I would like to save it using a MATLAB command.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 29 Jun 2023
Edited: MathWorks Support Team on 29 Jun 2023
This change has been incorporated into the documentation in Release 2009a. The following documentation link explains how you may achieve this functionality.
For previous releases, read below for any additional information:
1. Using the GET_PARAM function, for getting system and block parameters, with the DIRTY model parameter, a Simulink model can be checked if it is changed or not. Type the following command at the MATLAB Command Window:
get_param(gcs,'dirty')
If the output is OFF, then it implies that no change has been made. If the output is ON then a change has been made to MDL.
More info of the GET_PARAM function is shown at the following weblink:
2. The Simulink model can be saved from the Matlab command window using the save_system command. More information about this function can be found at the following weblink:

More Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products


Release

R2007b

Community Treasure Hunt

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

Start Hunting!