title: Stop Matlab from using set methods when loading matlab.mixin.Copyable object?
body: <p>I have a classe derived from matlab.mixin.Copyable.  Some of the properties have <code>set</code> methods.  I want the setting of those properties to also update other properties so that the relationship between the parameters are consistent (a classic use of set methods).</p>
  
  <p>Unfortunately, when I <code>load</code> a <code>*.mat</code> file [specifically using, say, <code>x=load('file.mat')</code>], setters are also used.  There should be no need for that kind of automatic update of multiple parameters, since all the object's properties can be copied from the *.mat file and self-consistency is automatically maintained.  Instead, using setters during <code>load</code> causes errors because the setter uses other properties that haven't yet been assigned to in the <code>load</code> process.  I see this from error that occurs during the <code>load</code>, and from checking the properties that are needed by the setter.</p>
  
  <p><strong>Is there any way to force the <code>load</code> to do a simple replication of the property values contained the <code>*.mat</code> file?</strong>  Some of the properties are complex objects themselves, so what's needed is a recursive copy-by-value during <code>load</code>.  It seems rather inappropriate to use setters during a <code>load</code>, for the reasons above.</p>
  
  <p>P.S. I say above that the setter uses another as-yet-unassigned property.  Let's call this property <code>p2</code>.  It also gets assigned to by a setter for 3rd property <code>s1</code>.  It seemed odd, but <code>s1</code> <em>does</em> have a value, while <code>p2</code> does not.  One possible reason is that <code>p2</code> relies on other properties in addition to <code>s1</code>, and those might not have been assigned to when <code>s1</code> is loaded (i.e., when the <code>s1</code> setter is invoked).  The whole problem stems from the fact that <code>load</code> occurs outside of the context and the order in which properties are assigned to during the execution of the code that created it.  This is the key reason why (it seems to me that) <code>load</code> should <em>not</em> use setters.  Otherwise, it seems to be incompatible with either copying or loading (I'm not sure which at the moment -- maybe both).</p>