title: How do I extract the function from a piecewise defined function in Matlab?
body: <p>I'm using the new Matlab piecewise function (<a href="https://www.mathworks.com/help/symbolic/piecewise.html" rel="nofollow noreferrer">https://www.mathworks.com/help/symbolic/piecewise.html</a> ) introduced in the Symbolic Math Toolbox <code>R2016b</code> to define a function, and I'm trying to extract the function. Specifically my code looks something like:</p>
  
  <pre><code>syms x;
  y = piecewise(x&gt;1,3*x^2,0);
  </code></pre>
  
  <p>I'd like to be able to extract just the <code>3*x^2</code> from <code>y</code> without the condition. </p>
  
  <p>Any idea how to do that?</p>