2
$\begingroup$

For example, I have the following list:

AA={{0, 20000.}, {26.6, 19950.}, {53.2, 19950.}, {79.8, 
  19950.}, {97.1198, 18644.1}, {102.681, 16452.3}}

Another calculation results in an arbitrary value intended for the first part of the list, let's say 21.3. By interpolating linearly, this results in a value of 19960 for the second part of the list.

How can I import this in Mathematica?

$\endgroup$
2
  • $\begingroup$ what would an improvement look like? What value would you expect? $\endgroup$
    – user21
    Jul 24, 2013 at 17:57
  • $\begingroup$ I would expect an value of 19960 (In case of 21.3 in the first part of the list), but I don't know how to program this in Mathematica.. $\endgroup$
    – Paus
    Jul 24, 2013 at 18:04

1 Answer 1

2
$\begingroup$

If you use an InteprolationOrder->1 things work as you expect:

if = Interpolation[AA, InterpolationOrder -> 1];
if[21.3]
(*19960.*)
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.