[R] Point of intersection
jholtman at gmail.com
Fri Oct 3 14:18:12 CEST 2008
Here it is by hand. You can probably create an iterative solution:
> plot(x,p1,type='n',ylab="Density",main="Overlap Measure")
> f.x <- function(x) abs(dnorm(x,0,1) - (.07 + .01*x))
> optimize(f.x, c(-10,0))
> optimize(f.x, c(-5,0))
> optimize(f.x, c(-2,10))
On Thu, Oct 2, 2008 at 11:44 PM, Lavan <rsumithran at yahoo.com> wrote:
> 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.
> plot(x,p1,type='n',ylab="Density",main="Overlap Measure",xaxt="n",yaxt="n")
> 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.
> 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.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
+1 513 646 9390
What is the problem that you are trying to solve?
More information about the R-help