undefined function 'piecewise' for input arguments of type 'double'.
Show older comments
Trying to run this piecewise function:
x = [-5:0.1:5];
y = piecewise(x <= 1, ((-2.*(x.^2))+9.*x-7), double(x) > 1, ((10.*sqrt(x))+3));
plot (x,y);
but it gives the following error: "Undefined function 'piecewise' for input arguments of type 'double'."
any fixes please?
thanks in aniticipation.
Accepted Answer
More Answers (0)
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!