title: How would perform a piecewise equation with multiple variables in matlab?
body: <p>I've been trying to do the following piecewise function:</p>
  
  <pre><code>y(x,t) = {  0                   (t - 5) &lt; 0 
           { (t - 5)*(t - x)      x &lt; (t - 5) 
           { (t + x^2)            x &gt;= (t - 5) 
  </code></pre>
  
  <p>I don't seem to understand how to graph this function since x = 0:.5:10 and t = 0:.1:10. I know how to do this without the t but I get lost when the t is included and has different intervals compared to the x. </p>
  
  <p>Thanks, Y_Y</p>