5 Replies Latest reply: Dec 26, 2011 8:02 AM by zsantiqlik

# Interpolation between 4 possible values

Hey, I need to get a value as a result of an interpolation in a double-entry table.

The table is:

- Column A

- Column B

- Column C

By giving values to A and B, I need to calculate C.

As in the double-entry table I have discrete values (ex: 5, 10, 15......) but I may need to get into the table with some other value (ex: 12,3), the result should be the consequence of an interpolation process between the four possible values.

Here is an example

The result should be something between 6, 7, 12 and 17.

The expression could be put in a Text Object.

Thanks

• ###### Re: Interpolation between 4 possible values

hei

check this example

• ###### Re: Interpolation between 4 possible values

Maybe not an optimal solution, but please find attached my proposal for kind of a linear fit.

Regards,

Stefan

• ###### Interpolation between 4 possible values

Theres must be something wrong with my QV10 because, for both examples, no matter what values I set to parameters A and B, C is always 0..... is not working

• ###### Interpolation between 4 possible values

If you open my document, do you see any values for A, B and C? Which ones?

I noticed that there is potential issue with your numbers. I assumed that A and B are whole numbers in intervals of 5, looking at the fields, this seems to be not the truth. At least for field A, some values seem to be some 1/10000 off.

Do we need to handle unevenly spaced sampling points for A (and/or B)? I think this is going to make the whole thing a lot more complex.

Since the differences to whole integer numbers are very small, maybe this is only some kind of  error in reading the data in, if so, please check the source and the load. Would it be possible to share the source file?

• ###### Interpolation between 4 possible values

It's working fine, and it's exactly what I needed.

But, as this will be a batch process for many values, any idea on how to make it work in the script instead of the object?

Thanks