Thank you Tobias.

I've seen the explanation, I'm going. Next time

________________________________
De : Tobias Boege <tabo...@gmail.com>
Envoyé : mardi 18 avril 2017 09:55
À : mailing list for gambas users
Objet : Re: [Gambas-user] Polynomiale Least Square

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
Gambas Documentation - /comp/gb.gsl - 
gambaswiki.org<http://gambaswiki.org/wiki/comp/gb.gsl>
gambaswiki.org
gb.gsl. This component aims at providing most of the features of the Gnu 
Scientific Library. At the moment, it adds support for complex numbers, 
vectors, matrices and ...


[2] https://en.wikipedia.org/wiki/Lagrange_polynomial
Lagrange polynomial - 
Wikipedia<https://en.wikipedia.org/wiki/Lagrange_polynomial>
en.wikipedia.org
In numerical analysis, Lagrange polynomials are used for polynomial 
interpolation. For a given set of distinct points and numbers , the Lagrange 
polynomial is the ...



--
"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
Gambas-user Info Page - 
SourceForge<https://lists.sourceforge.net/lists/listinfo/gambas-user>
lists.sourceforge.net
To see the collection of prior postings to the list, visit the Gambas-user 
Archives. Using Gambas-user: To post a message to all the list members ...


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