je code en C++ en je ne comprend pas un truc:
ma fonction marchait très bien et maintenant elle se met à planter une fois sur 2 pour cause d'allocation de pointeurs je pense.
j'ai alors tout enlevé et déclaré mes pointeurs autrement et j'obtiens ceci:
void polyReg(double *x, double *y, int sizexy, double *a, int order_poly)
{
//realize polynomial interpolation.
//x : array of all points x coordinates.
//y : array of all points y coordinates.
//sizexy : size of x and y arrays.
//a : polynomial coeff returned.
//order_poly : order of polynom wanted.
//-----"Moindres Carrés" Method-----
int ord = order_poly + 1;
int n = sizexy;
double** A = new double*[ord];
for (int i=0 ; i