[R] Point of intersection

Lavan rsumithran at yahoo.com
Fri Oct 3 05:44:29 CEST 2008


Hi,

Let say I have a normal density X~n(0,1) and I have a line y=0.01x+0.07. the
following code generate the plots.

x=seq(-10,10,length=100)
plot(x,p1,type='n',ylab="Density",main="Overlap Measure",xaxt="n",yaxt="n")

pi=dnorm(x,0,1)
points(x,p1,type='l')
abline(0.07,0.01)

you can see that the curves intersects at 3 points. My question is how do I
mark the point of the intersection? I like to mark it as (x1,y1) as the
first point of intersection and so on. or I can just mark the x-coordinate
of the 1st intersection as x1 on the x-axis.

Thanks,

lavan 
-- 
View this message in context: http://www.nabble.com/Point-of-intersection-tp19791632p19791632.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list