+ Reply to Thread
Results 1 to 8 of 8

Determine the Intersection

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Determine the Intersection

    Hi I have 2 sets of data. One straight line and one curve.

    The curve consists of numbers that given, no formula...

    Can anyone please tell me how to get the intersection of these 2 graphs?

    I been struggling with it for hours, and just could not find a way. Any hints will be greatly appreciated. I posted the original attachment from my PC, worksheet: Intersection.

    Thank you!![/CENTER]
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Determine the Intersection

    Here's an alleged algorithm off the top of my head:
    a. Start at minimum x.
    b. Compare the y values at the x point, and note which y is greater.
    c. Repeat step b. until the other y is greater.
    d. Now you have two sets of xy cooordinates for line 1 and
    two sets of coordinates for line 2.
    e. Assuming each is a straight line, calculate the equation for each line:
    y1 = m1 * x1 + b1
    y2 = m2 * x2 + b2
    f. Where they intersect, both y1 and y2 will be the same, and x1 and x2 will be the same.
    Everything else is known except for x and y yields: m1 * x + b1 = m2 * x + b2
    g. Subtract (m2 *x ) from both sides yields: m1 * x + b1 - m2 * x = b2
    h. Rearranging yields: x * (m1 - m2) + b1 = b2
    i. Subtract b1 from both sides x = (b2 - b1)/(m1 - m2)
    j. Now solve for y yields: y = m1 * x + b1
    k. Double check : y = m2 *x + b2 should yield the same y.

    Lewis

  3. #3
    Registered User
    Join Date
    06-06-2013
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Determine the Intersection

    Hi Lewis,

    Thanks, but one set of data has no formula...

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,373

    Re: Determine the Intersection

    In which case, part of solving a problem like this is figuring out what formula to give that set of data (or at least, what formula to give it over the interval where it intersects the other line).

    What Lewis has suggested is a basic linear interpolation algorithm. Locate the interval that contains the intersection, use the data points that define the ends of that interval to define a line segment that approximates each curve, then solve that system of equations. Since you seem a little rusty on your algebra, I would suggest you start by reviewing some basic algebra:

    Finding the formula for a line connecting two points: http://www.mathsisfun.com/algebra/li...n-2points.html
    Solving systems of equations: http://www.purplemath.com/modules/systlin1.htm

    With these concepts, you should be able to use Lewis's overall idea to find the equations for the straight lines that would approximate where the two curves intersect, then use those two equations to find an intersection.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Determine the Intersection

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...ersection.html
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    06-06-2013
    Location
    australia
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Determine the Intersection

    Hi Ford,

    Are you saying that these websites are the same, as I am not aware of that...

    I actually bookmarked both websites.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Determine the Intersection

    No they are not, we are not related to them in any way. It is a forum rule though (and also just plain common courtesy) to let people that are try to help you, know that you have also asked for help elsewhere. How would you feel if you put effort into helping with something, only to find out, the person already solved it somewhere else?

  8. #8
    Registered User
    Join Date
    11-16-2013
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Determine the Intersection

    Hi,

    Use interpolation with:
    http://www.blueleafsoftware.com/Prod...ationExcel.php
    or
    http://xongrid.sourceforge.net/

    For each of your two functions create interpolation f1(x) and f2(x) calculate the difference and search the zero of the difference by changing x with the excel solver

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-16-2013, 06:41 PM
  2. intersection of two columns
    By Horst in forum Excel General
    Replies: 1
    Last Post: 11-01-2011, 08:23 AM
  3. Intersection
    By kamalhilmi in forum Excel General
    Replies: 1
    Last Post: 01-26-2011, 01:10 AM
  4. Looking for intersection
    By David in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-16-2005, 09:40 AM
  5. [SOLVED] intersection
    By Micro in forum Excel General
    Replies: 3
    Last Post: 06-29-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1