title: MATLAB - Update private property in case of other property change
body: <p>I have a class with a dependent property that takes a while to be evaluated. For this reason, I would like it not to be evaluated every time it is queried, but only when the object is instantiated and when certain properties are changed. I have found <a href="https://nl.mathworks.com/matlabcentral/answers/53542-oop-how-to-avoid-recalculation-on-dependent-properties-i-hope-a-mathwork-developer-could-give-me-a" rel="nofollow noreferrer">this interesting solution</a> that is based on defining an extra private property that is set whenever necessary, with the dependent property taking the value of this extra private property.</p>
  
  <p>Now the problem is: how can I make sure that this private property is set when the object is instantiated and it is automatically updated when certain properties of the object are changed?</p>