title: Dependent observable property in Matlab. Does it work?
body: <p>In Matlab class it seems to be syntactically correct to declare <em>property</em> that is <em>Dependent</em> (computed not stored) and  <em>Observable</em> in the same time. Consider code</p>
  
  <pre><code>properties (Access = private)
      instanceOfAnotherClass
  end
  properties (SetAccess = private, Dependent, SetObservable)
      propertyTwo
  end
  methods
      function val = get.propertyTwo(this)
          val = this.instanceOfAnotherClass.propertyOne;   
      end
  end
  </code></pre>
  
  <p>Does this work as expected? That is, if the property <code>propertyOne</code> of an object stored in <code>instanceOfAnotherClass</code> is changed is there property change event triggered by <code>propertyTwo</code>? Note that <code>propertyOne</code> is not <em>Observable</em>.</p>
  
  <p><strong>Edit:</strong>
  It does not work (as I expected). 'PostSet' event is not triggered. So how do I deal with this kind of situation? Is there a better solution then to create <code>propertyTwo</code> as a non <em>Dependent</em> and set it to the same value as 'propertyOne' every time 'propertyOne' changes?</p>
  
  <p><strong>Edit2:</strong>
  In reaction to <a href="https://stackoverflow.com/users/97160/amro">Amro's</a> <a href="https://stackoverflow.com/a/11653138/311865">edit of his answer</a> I will explain situation more complex.
  Consider this 2 classes:</p>
  
  <pre><code> classdef AClass &lt; handle
       properties
           a
       end
   end
   classdef BClass &lt; handle
       properties (Access = private)
           aClassInst
       end
       properties (Dependent, SetObservable, SetAccess = private)
           b
       end
       methods
           function this = BClass(aClass)
               this.aClassInst = aClass;
           end
           function val = get.b(this)
               val = this.aClassInst.a;
           end
       end
   end
  </code></pre>
  
  <p>The class that uses all this code should not get access to <code>AClass</code>. It interacts only with instance of <code>BClass</code> and wants to listen to changes of property <code>b</code>. however if I make property <code>a</code> of <code>AClass</code> observable that would not solve my problem, would it? The 'PostSet' events are not going to propagate to property <code>b</code>, are they?</p>