title: How to visualize trees and splitting values in Matlab's TreeBagger
body: <p>I'm new to TreeBagger in Matlab. I devised 2 simple cases to learn TreeBagger (Random forest). Suppose the independent variable is z:</p>
  
  <p><strong>First case: 1 variable:</strong></p>
  
  <pre><code>z = {'hi';'hi';'hi';'hi';'hi';'hi';'low';'low';'low';'low';'low';'low'};
  </code></pre>
  
  <p>and the predictor variables is x, and y:</p>
  
  <pre><code>x = [1 1 1 1 2 1 2 2 2 2 1 2];
  </code></pre>
  
  <p><strong>Second Case: 2 variables</strong></p>
  
  <p>Same as before but with an additional variable y:</p>
  
  <pre><code>y = [1 1 1 2 1 1 2 1 2 2 1 2];
  </code></pre>
  
  <p>Solving for Case 1:</p>
  
  <pre><code>b = TreeBagger(1,x,y, 'Method','classification','NVarToSample',1,'oobpred','on');
  </code></pre>
  
  <p><strong>What I want:</strong></p>
  
  <p>Case 1&amp;2: Visualize the classification tree used (I chose one), and also to see the splitting threshold...</p>