MATLAB: Does saving a parameter reference to a mat-file result in a deep copy of that parameter in Simulink

simulink

In the base workspace I have some references to Simulink.Parameter object which I created through the following steps:
a = Simulink.Parameter;
a.Value = 1;
b = a;
After saving a and b to a mat-file and reloading them to the workspace both are independent parameters now.

Best Answer

When saving a Simulink dataobject, such as a Simulink.Parameter, to a MAT-file, there is an implicit call to the DEEPCOPY method of these objects. For more information on this method, refer to the Related Solution below.