+ Reply to Thread
Results 1 to 5 of 5

Two Dimensional Linear Interpolation

  1. #1
    Registered User
    Join Date
    08-25-2018
    Location
    Massachusetts
    MS-Off Ver
    OS10
    Posts
    2

    Two Dimensional Linear Interpolation

    Hi All Along the x axis I have say 20 30 40 and on the y axis have in descending order 500, 400,300,200,100,0,-100. The scores are in the middle. Basically, higher scores to the upper right, lower scores to the lower left.

    Given say an x value of 27, and a y value of 237, what two dimensional interpolation formula could I deploy to find the "score" ? A formula (in know "forecast" in in there) has to interpolate between 20 and 30, then 300 and 200 and then interpolate again to find the final answer.

    Thanks if have any suggestions.

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

    Re: Two Dimensional Linear Interpolation

    A basic outline I put together for bilinear interpolation (assuming bilinear interpolation is an accurate description of your desired algoirthm): https://www.excelforum.com/excel-gen...ml#post4300787 I note that it seems that the most difficult part of linear interpolation algorithms seems to be the lookup step, so pay particular attention to the lookup step.
    Here's one that implements a trilinear interpolation. Scaling back to bilinear should be straightforward: https://www.excelforum.com/excel-for...rpolation.html
    Note that in both cases we are proposing multi-cell solutions. I don't know about trying to compress a multivariable linear interpolation algorithm down to a single cell function.
    I don't know if any still do, but my old copy of QuattroPro has a built in @LINTERP() function that would make this a lot easier. Unfortunately, since Excel took over as the dominant spreadsheet, built in LINTERP() type functions have faded in availability.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Two Dimensional Linear Interpolation

    =forecast(e2,forecast(e1,offset($a$3,match(e2,a3:a20)-1,match(e1,a3:u3)-1,1,2),offset($a$3,,match(e1,a3:u3)-1,1,2))*{1;0}+forecast(e1,offset($a$3,match(e2,a3:a20),match(e1,a3:u3)-1,1,2),offset($a$3,,match(e1,a3:u3)-1,1,2))*{0;1},offset($a$3,match(e2,a3:a20),0,-2))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-25-2018
    Location
    Massachusetts
    MS-Off Ver
    OS10
    Posts
    2

    Re: Two Dimensional Linear Interpolation

    Tried but this is just not working. Start by getting DIV errors (div by 0) and then #N/As - no matter what "score" filling in between. Any suggestions ? Thought it was the A3 cell changing that to A4 did not work either.

  5. #5
    Registered User
    Join Date
    08-25-2018
    Location
    Massachusetts
    MS-Off Ver
    OS7
    Posts
    3

    Re: Two Dimensional Linear Interpolation

    Problem is that the x scale is non linear. The Y scale is linear.

+ 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. Seeking tutoring HELP! with Linear Interpolation formula inputs
    By kashbay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2017, 10:55 PM
  2. [SOLVED] how to do linear interpolation
    By fight2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-11-2015, 08:40 PM
  3. 2D linear interpolation
    By mochen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2012, 05:01 AM
  4. VBA Linear Interpolation
    By WAW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-25-2010, 04:55 PM
  5. Linear interpolation
    By bruteforce in forum Excel General
    Replies: 0
    Last Post: 04-25-2009, 01:11 PM
  6. [SOLVED] Linear Interpolation
    By Metalmaniac in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-03-2005, 10:05 AM
  7. linear interpolation
    By Taha in forum Excel General
    Replies: 3
    Last Post: 01-31-2005, 11:06 AM

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