MATLAB: Why mupad picewise function is bugged

mupadpiecewisesymbolicSymbolic Math Toolbox

I have pw(t):= piecewise([x > 0 and x < 1, 1], [Otherwise, 0])
When I try to evaluate: pw(1/2) it returns pw(1/2)… I wonder if the function is bugged Thanx

Best Answer

If you have R2016b, you can just use the piecewise function:
Here is an example:
Related Question