1. ## [RESOLVED] data interpolation

Hello

hope everybody is fine !

Please, I tried to look in old post without success

I'd like to find a sub, capable of giving me a polinomial interpolation of some data

ex

A B
A1 B1
A2 B2
A3 B3

I'd like to find a function like this
B = f(A)

where f = c0+c1*A^1+c2*A^2+c3*A^3

the aim is to get the coefficients

c0
c1
c2
c3

etc

2. ## Re: data interpolation

Paul

This seems so specialized that I really doubt if anything already exists in VB6.
Most likely, you will have to create an algorithm yourself.

Could you perhaps give an example with "actual values"

Spoo

3. ## Re: data interpolation

You may find this link http://www.freevbcode.com/ShowCode.asp?ID=7891 interesting

4. ## Re: data interpolation

Hello

Mr. Doogle, this is indeed what I was looking for, thanks !

Mr. Spoo, the example is

A B
100 5
300 50
350 90
500 160

with excel, I get following polinomial
B = -1E-05*A^3 + 0,0097*A2 - 2,3808*A + 155,63

The aim of the sub I am looking for is to get the values of -1E-05, +0.0097, -2.3808, 155.63

Thanks

5. ## Re: data interpolation

@Sam: I read OP as requiring something that would calculate the 'best fit' of data points to a cubic Polynomial to enable interpolation between knonw values (eg a Curve Fit).

@Paul: If the problem is resolved to your satisfaction you can mark the thread as resolved (Navigate to the top of the thread and click on "Thread Tools" then select "Mark Thread as Resolved")

Good luck with the project

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Featured