Using max and plot
I want to plot a function such as x mapsto max(x,1). How do I do that?
I want to plot a function such as x mapsto max(x,1). How do I do that?
Try this using max_symbolic
. It won't do as much as you might like, but you can plot it, at least.
Edit - didn't have time to include the code earlier:
plot(max_symbolic(x,1),(x,-5,5),ymin=0)
Try using a lambda function.
This works for me:
sage: plot(lambda x: max(x, 1), (-5, 5), ymin=0)
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2016-11-14 21:18:59 +0100
Seen: 614 times
Last updated: Nov 15 '16