Plot a function in a defined domain with R

Quite basic stuff to achieve with R, but very useful!!

> x <- c(1,5,10,50,100,500,1000)

> y <- 1/sqrt(x)

> plot(x,y)
> curve(1/sqrt(x), add=TRUE)




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.