Вы находитесь на странице: 1из 5

Home   Application Concepts   Product Concepts   Tarsier Tools   Additional Information

Home » Tarsier Tools » Linear Interpolation Function


Tarsier Tools
Linear Interpolation Function (TT03­002)
Designed for Microsoft Excel, this "Tarsier Tool" interpolates between consecutive ordered points from the
given data. The function can be configured to interpolate using either a step or linear function. If the input
value is outside of the range of the X coordinates the function can be configured to either perform a linear
extrapolation  using  the  two  nearest  points;  return  a  constant  value  of  the  nearest  value  or  return  the
Excel #N/A value.

Please note that this Tarsier tool is distributed with NO WARRANTY.

This page contains the following information on this Tarsier Tool.
Usage Instructions
License Fee
How to Install
How to Uninstall
Revision History
Software for Download
Source Code
Technical Support
Further Information

Usage Instructions
To use the Linear Interpolation Function:
The following instructions assume you know how to use Excel Functions.
If  you  use  Excel's  function  paste  menu,  our  interpolation  function  can  be  found  either  under  the  "All"
listing or under "User defined".

The function has three mandatory arguments and two optional arguments.
You must;
1.  specify the range of cells containing the known X values, (argument known_x)
2.  specify the range of cells containing the known Y values, (argument known_y)
3.  specify the X value you are interpolating against, (argument x_Value)

With  this  information  the  function  will  perform  linear  interpolation  to  find  the  specified  value,  or
extrapolate to find the Y value if the X value is outside the range of known X values.

Additionally, you can specify the following options;
1.  what  value  should  be  returned  if  the  X  value  interpolated  against  is  outside  the  range  of  known  X
values, (argument cutOffAction, 0 = extrapolate; 1 = cut off at the nearest known value, 2 = return
#NUM!),
2.  use  step  interpolation,  (argument  step  binary  value,  false  =  perform  linear  interpolation,  true  =
perform stepwise interpolation),

Important Note:
The known X values must be in numerical order, minimum to maximum.

Examples
The values in the Example result column are calculated using the following data.

Description x_value cutOff step Example formula Example result


Compulsory arguments 1.5 Not Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,1.5) 2.7
­ within X value range specified specified
Compulsory arguments ­1.0 Not Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,­1.0) 0.5
­ outside X value range specified specified
6.0 Not Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,6.0) 35.5
specified specified
Cut off if outside X ­1.0 1 Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,­1.0,1) 0.8
value range specified
6.0 1 Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,6.0,1) 26.0
specified
­1.0 2 Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,­1.0,2) #NUM!
Return error if outside
specified
X value range
6.0 2 Not =LinearInterpolator($A$2:$A$7,$B$2:$B$7,6.0,2) #NUM!
specified
Stepwise interpolation ­ 1.5 0, 1, 2 True =LinearInterpolator($A$2:$A$7,$B$2:$B$7,1.5,0,True) 1.1
within X value range 2.001 0, 1, 2 True =LinearInterpolator($A$2:$A$7,$B$2:$B$7,2.001,0,True) 4.3
3.9999 0, 1, 2 True =LinearInterpolator($A$2:$A$7,$B$2:$B$7,3.9999,0,True) 9.9
Stepwise interpolation ­ ­1.0 0 True =LinearInterpolator($A$2:$A$7,$B$2:$B$7,­1.0,0,True) 0.8
outside X value range 6.0 1 True =LinearInterpolator($A$2:$A$7,$B$2:$B$7,6.0,1,True) 26
­4 2 True =LinearInterpolator($A$2:$A$7,$B$2:$B$7,­4.0,2,True) #NUM!

Note,  constant  values  shown  in  the  example  equations  above  can  of  course  be  replaced  be  replaced  by
cell references, definitions, etc...

Error Messages
When  using  the  Linear  Interpolation  Function,  it  will  return  Excel  error  codes  in  the  following
circumstances;

1.  If you only supply one point (one X and one Y value) the function will return the Excel #NUM! value,

License Fee
There  is  no  license  fee  for  personal  use  of  this  tool.  However,  if  you  are  using  this  software  within
software that you are developing and intend to sell, please e­mail me for details of the license fee.

How to Install
1.  Download  the  appropriate  Linear  Interpolation  Function  for  your  version  of  Windows®  and  Excel  (see
the  Software  section  of  this  page)  and  use  the  save  this  file  to  disk  option  to  save  the  file  to  a
directory on your computer where you'll be able to find it later. (See Note below).  A  good  location  to
save the file is to your Microsoft Excel Add­In directory, which can be found by completing steps 2, and
3.
2.  Start Microsoft Excel, and from the Tools menu, select Add­Ins...,
3.  Click on the Browse... button, which will list all the non Microsoft Excel Add­Ins,
4.  A. If you saved the file to your Microsoft Excel Add­In directory, select TT03­002.xla from the list of
files and click the OK button,
B. If you saved the file to another directory, change to that directory in the same way that you would
use the Open file dialog to open a file; then select TT03­002.xla from the list of files and click the OK
button,
5.  Ensure that the box for the "Linear Interpolator" is ticked/checked, as shown below, and click OK
My Linear Interpolator Function is now ready for use.

How to Un­install
To uninstall the Linear Interpolator Function,
1.  Start Microsoft Excel, and from the Tools menu, select Add­Ins...,
2.  Un­tick/un­check the box for the "Linear Interpolator Function" and click OK.

If you decide that you want to use the Linear Interpolator Function again, just perform steps 2 and 5 from
the How to Install Procedure.)

If you want to remove the Linear Interpolator Function reference from the list of Add­Ins,

1.  Delete the file TT03­002.xla from your computer,
2.  Start Microsoft Excel, and from the Tools menu, select Add­Ins...,
3.  Try  to  tick/check  the  box  for  the  "Linear  Interpolator  Function"  the  following  message  will  appear,
"Cannot find add in 'directory path\TT03­002.xla'. Delete from list?". Click Yes,
4.  Close the Add­In dialog box by clicking OK.

Revision History
Rev Date Description
1.0 10­Nov­03 Initial Version Released

Software for Download
Windows Ver. Excel Ver. Software
Win 2000 Excel 97 TT03­002.xla
Win XP Pro Excel 2003

Please  let  me  know  if  you  have  used  my  Linear  Interpolation  Function,  successfully  or  not,  on  any  other
Windows® and Excel combination.

Source Code
In  accordance  with  the  GNU  General  Public  License  the  Microsoft  Excel  Add­in  used  to  distribute  this
Tarsier  Tool  is  not  password  protected  allowing  you  to  view  and  modify  it  if  you  require.  You  should
review  the  GNU  GPL  to  determine  your  rights  to  distribute  this  software  and  be  informed  that  this
software is distributebuted with NO WARRANTY.

Technical Support
Frequently Asked Questions
Currently there are no FAQ for this tool. If you have a question, please e­mail it to us. Please ensure that
you identify which Tarsier Tool, (Linear Interpolation Function TT03­002) the question is about.

Bug­Reports
If you suspect a bug in this Tarsier Tool, before contacting me, please check the FAQs and Bug Reports to
see if it has already been identified. If it hasn't, e­mail  me  a  description.  Please  ensure  you  identify  the
Tarsier Tool, (Quadratic Regression Function TT03­001), the operating system and spreadsheet program in
the  e­mail  and  include  as  much  detail  as  possible;  including  a  simple  example  application  is  always
helpful! but make sure it does not contain proprietary or confidential information.

Currently there are no reported bugs for this Tarsier Tool.

Further Information
This section will be updated with links to information relating to the principles behind and the uses of this
Tarsier Tool, as I become aware of them.

Back to Available Tarsier Tools

Вам также может понравиться