On Tue, 18 Apr 2017, cheikh diabang wrote:
> Hello. I would like to write gambas code which determines the polynomial of a 
> set of x, y coordinates. Is there anyone who has used it to help me please.

If your polynomial has real or complex coefficients you can use gb.gsl's [1]
Polynomial class. But while the documentation says arithmetic operators are
overloaded in gb.gsl, this isn't entirely true for polynomials. In particular
multiplication of polynomials is not supported. You have to implement that
yourself using the array accessors. Addition and multiplication of polynomials
is all you need for Lagrange polynomials [2] which solve your interpolation
problem. I have done it before, it's straightforward.

Regards,
Tobi

[1] http://gambaswiki.org/wiki/comp/gb.gsl
[2] https://en.wikipedia.org/wiki/Lagrange_polynomial

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to