Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 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.  
  20. for (i in 1:5){
  21. #lines(x, fx, d1[i], d2[i], type = "l", col=colpal[i])
  22. lines(col=colpal[i],curve(df(x,df1=d1[i],df2=d2[i]), from=0, to=5, add=TRUE))
  23.  
  24. }
  25.  
  26.  
  27.  
  28. # d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement