Results 1 to 5 of 5

Thread: [RESOLVED] data interpolation

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2011
    Posts
    49

    Resolved [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

    Please, may I ask you if there is something already realized in VB6 ?

    Thanks in advance !

  2. #2
    PowerPoster Spoo's Avatar
    Join Date
    Nov 2008
    Location
    Right Coast
    Posts
    2,656

    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.
    I'd like to help you, but your info is so "generic" that I can't really follow.

    Could you perhaps give an example with "actual values"

    Spoo

  3. #3
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: data interpolation

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

  4. #4

    Thread Starter
    Member
    Join Date
    Jan 2011
    Posts
    49

    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. #5
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    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
  •  



Click Here to Expand Forum to Full Width