MATLAB: How to plot a symbolic equation

equationfplotplotsymbolicsyms

How can I plot the symbolic equation for and for ?
I already tried fplot with no success.
The Result should look like this:

Best Answer

Using piecewise (R2016b and later versions) may be an option.