MATLAB: Is the Model Workspace dirty

dirtymodel workspacesimulink

Is there a programatic way to determine if the model workspace is dirty, which is indicated by an asterisk next to "Model Workspace" in the model explorer?

Best Answer

Check this code out:
Z=get_param(gcs,'ModelWorkspace');
Z.isDirty