Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # Week 2 Exercise 3
  2.  
  3. # This exercise is NOT TESTED WITH RTMC, but you should use this template to create
  4. # the plots and SUBMIT YOUR CODE TO THE SERVER. After writing your code, the pictures
  5. # can be plotted by pressing "Source" (the pictures will appear on the Plots tab).
  6. # a)
  7. plot(NULL, xlim = c(0,5), ylim = c(0,2.5))
  8. x <- seq(0,5, by=0.01)
  9.  
  10.  
  11. # b)
  12. d1 <- c(1,2,5,10,100)
  13. d2 <- c(1,1,2,1,100)
  14. colpal <- c("red", "black", "blue", "green", "grey")
  15.  
  16.  
  17. # c)
  18. fx <- df(x,d1,d2)
  19. lines(x, fx, d1[1], d2[1], type = "h", col=colpal)
  20.  
  21. # d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement