// donne  les points et les poids de Gauss  en fonction du nombre de points choisi pour 
// l'integration numerique
function [XG,PG] = gauss(Ng)
//

//
 XG = zeros(Ng,1); PG = zeros(Ng,1);
if Ng == 1  then
          XG(1) = 0; PG(1) = 2;
end;
if Ng == 2 then
          XG(1) = -0.577350262918; XG(2) = -XG(1);  
          PG(1) = 1;               PG(2) = PG(1);
end;
if Ng == 3  then
          XG(1) = -0.774596669241483;  XG(2) = 0.;                XG(3) = -XG(1);
          PG(1) =   .555555555555556;  PG(2) = .888888888888889;  PG(3) = PG(1);
end;
if Ng == 4 then
          XG(1) = -0.861136311594052;  XG(2) = -0.339981043584856; XG(3) = -XG(2);   XG(4) = -XG(1);
          PG(1) =   .347854845137454;  PG(2) =   .652145154862545; PG(3) =  PG(2);   PG(4) = PG(1);
end;
if Ng == 5 then
          XG(1) = -0.906179845938664;  XG(2) = -0.538469310105683; XG(3) = 0;                XG(4) = -XG(2);   XG(5) = -XG(1);
          PG(1) =   .236926885056189;  PG(2) =   .478628670499365; PG(3) = .568888889888889; PG(4) =  PG(2);   PG(5) =  PG(1);
end;
if Ng == 6 then
          XG(1) = .932469514203152;  XG(2) = .661209386466265; XG(3) = .238619186083197; 
          XG(4) = - XG(3);         XG(5) = - XG(2);          XG(6) = - XG(1);
          PG(1)=.171324492379170; PG(2)=.360761573048139; PG(3)=.467913934572691; 
          PG(4)= PG(3);           PG(5)= PG(2);           PG(6)= PG(1); 
end;

endfunction 
