Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. person1<-function(x) { x }
  2. person2<-function(x) { 2 * (x-10)}
  3. plot(0, type="n", xlim=c(0,50), ylim=c(0,100), xlab="t", ylab="Performance")
  4. curve(person1, 0, 50, add=T, col="blue")
  5. curve(person2, 10, 50, add=T, col="red")
  6. legend("topright", legend=c("Person with 1H", "Person with 2H"), pch=c(4,4), col=c("blue", "red"))
  7.  
  8. person1<-function(x) { 1 * exp(0.15 * x) - 1 }
  9. person2<-function(x) { 4 * exp(0.15 * (x - 10)) - 4}
  10. plot(0, type="n", xlim=c(0,50), ylim=c(0,500), xlab="t", ylab="Performance")
  11. curve(person1, 0, 50, add=T, col="blue")
  12. curve(person2, 10, 50, add=T, col="red")
  13. legend("topright", legend=c("Person with 1H", "Person with 4H"), pch=c(4,4), col=c("blue", "red"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement