Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = seq(-50, 150, by = 0.1)
- F2 = function(x) ifelse(x >= 0, ifelse(x <= 100, x/2, x), 0)
- G2 = function(x) ifelse(x >= 50, x-50, 0)
- matplot(x, cbind(F2(x),G2(x)), type = "l")
- legend("topleft", legend = c("F2", "G2"), lty = 1:2, col = 1:2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement