+ Reply to Thread
Results 1 to 9 of 9

Thread: Fit non-linear function

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Fit non-linear function

    Hi-

    I have a table of data that was generated by doing monte carlo simulations which were driven by two variables (the attached shows variable values as the row and column labels with results in the body of the table). I'm wondering if anyone can help me figure out a way to determine a non-linear formula that i can use to best represent the data? Unfortunately, interpolating isn't an option because I need to be able to use the closed form function in other applications. Very much appreciate any help.

    Thanks,
    JonnyB
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Fit non-linear function

    Hi JohnnyB,

    welcome to the forum.

    If you chart each row of data in an XY chart, using row 2 as X values and one of the data rows as Y values, you can then add a polynomial trendline with an order of 6, display the equation on the chart and there's your non-linear formula.

  3. #3
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Fit non-linear function

    Thank you.

    And thanks for such a prompt response. I hate to expose myself as dense in just my second post , but I've tried fooling around with this a bit and its not clicking. As an end result, I'm looking for an equation where I can input a value from row 2 and a value from column B and have returned a value that is very close to where they intersect in the original table of data - I'm just not seeing how the above takes into account all the values in column B or more than one row of data? I feel like I'm missing obvious...again, I really appreciate the help.
    Last edited by teylyn; 02-12-2010 at 03:56 AM.

  4. #4
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,151

    Re: Fit non-linear function

    Please do not quote whole posts. Only quote when you're not responding to the immediate last post, and then only quote the pertinent bits.

    If you input a value from row 2 and a value from column B, then you can use a simple index/match combo to return exactly that intersect from the table. Depending on how you set up the index/match combo, it will return the closest match if you enter numbers that are in between the values of row 2 and/or column B.

    Such a formula looks like

    =INDEX(C3:Z43,MATCH(Row2_Value,B3:B43,1),MATCH(ColumnB_Value,C2:Z2,1))

  5. #5
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Fit non-linear function

    Apologies.

    Right, that is something I actually do know how to do, but unfortunately as I mentioned, I need a closed form equation for use outside of excel. Was hoping that I could use excel to determine what that might be.

  6. #6
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: Fit non-linear function

    The equation for a line is y = mx + b

    where m=INDEX(LINEST(known_y's,known_x's),1)

    and b=INDEX(LINEST(known_y's,known_x's),2)

    you can now find x or y

    hope it helps
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

  7. #7
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,770
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Fit non-linear function

    Thanks shg - that looks like it does exactly what i'm looking for. Any pointers on how to get from the coefficients table to an equation of the form z = ...y + ...x + ....? (having trouble following the matrix mult functions)

  9. #9
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,770

    Re: Fit non-linear function

    See attached. The picture shows the setup for the SurfaceSolver form, and the reconstruction formula is in the output table.
    Attached Files Attached Files
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0