title: ClassificationTree array in MATLAB
body: <p>I am very new to MATLAB.  I was trying to train some ClassificationTree's and the assign them in array with the following snippet</p>
  
  <pre><code>for k = 1:rows
     tree=ClassificationTree.fit(data(1:k, 1:cols),labels(1:k));
     ensemble(k)=tree;
  end
  </code></pre>
  
  <p>however when I run this I get following error</p>
  
  <pre><code>??? Error using ==&gt; DisallowVectorOps&gt;DisallowVectorOps.subsasgn at 28
  You cannot assign to an object of class double using () indexing.
  
  Error in ==&gt; dwm02 at 7
  ensemble(k)=tree;
  </code></pre>
  
  <p>is there any way of doing this? MATLAB help on object arrays is a bit confusing.. </p>