Reputation: 105
Im trying to set up a symbolic expression V using the symbolic variable x like:
V = piecewise(x<=0.5, 2*x, x>0.5, 2-2*x)
However MATLAB doesn't even recognise this command although it is mentioned in their documentation.
The error it keeps returning is:
Undefined function or variable 'piecewise'.
I searched online for this error message, and some names like MuPad Notebook kept popping up, but I don't know what those mean either. I do have the Symbolic Math Toolbox ( I checked using which privResolveArgs
).
Finally, Im using MATLAB 2016a if that helps.
Thanks for all the help, in advance.
Upvotes: 0
Views: 561