Advertisement
celestialgod

plot integreal of cdf

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