title: Conditional expression in symbolic Matlab
body: <p>If we do the following,</p>
  
  <pre><code>function [z] = a(x,y)
  syms x y
  If I do the following code,
  if x&gt;5
      z=x+y
  else
      z=x-y
  end
  end
  </code></pre>
  
  <p>then I hope to have something like (as in Mathematica)</p>
  
  <pre><code>z=IF[x&gt;5,x+y,x-y]
  </code></pre>
  
  <p>I do not insist on having the exact same code as above. I am flexible. I just want to have "just one line" which expresses how input of function results in output when there are if in the code.</p>
  
  <p>Is this possible?</p>