Reputation: 133
It's not obvious to me how to plot on wolframalpha a function that contains conditionals, the one I have in mind is:
clamp lowerBound upperBound i
| i > upperBound = upperBound
| i < lowerBound = lowerBound
| otherwise = i
Upvotes: 0
Views: 928
Reputation: 1701
I've used min(max(i, lowerBound), upperBound), but it does make your equation look messy.
Upvotes: 2