comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Point of intersection
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Point of intersection [message #61816 is a reply to message #61815] Wed, 30 July 2008 09:11 Go to previous messageGo to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Jul 30, 11:55 am, Bennett <juggernau...@gmail.com> wrote:
> On Jul 30, 11:46 am, kishore1...@gmail.com wrote:
>
>
>
>> Hello,
>
>> I hope this is simple question for experienced guys.
>> How to find out perfect point of intersection of x value and
>> corresponding y value.
>> For example:
>> x1=[0.1,0.2,0.6,0.7]
>> x2=[0.5,0.4,0.5,0.3]
>> y=[1,2,3,4]
>> plot,x1,y,xran=[0.,0.8]
>> oplot,x2,y
>
>> In this, two plots are intersection at one point, how to find out that
>> particular interesection x and y value.
>
>> Thanking you,
>
>> Kishore
>
> Well if the y values are always equal like you have there then they
> will intersect where the x values are equal. Unless I'm thinking the
> wrong way? Which is entirely possible....

Think I may have jumped the gun there...what you really want to do
since your dataset does not have any x that match (what I neglected to
see because I'm not the brightest bulb) is to interpolate both your
x's over a longer range and then find where they match within some
error...like the following

x1_int = interpol(x1, 100)
x2_int = interpol(x2, 100)
location = where(abs(x1_int-x2_int) LT 0.001) ;- Where you can set
your error to whatever it is that you want..which I assume will depend
on the degree to which you interpolate

For your case this gives the intersection to be 0.4666

Hope this helps get you in the right direction....as well as myself
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spawn
Next Topic: PSF Energy inside circle

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:18:13 PDT 2025

Total time taken to generate the page: 1.91838 seconds