function [x,k,err]=IPN(B,b,g,x0,eps,kmax) //- Methode de Newton pour resoudre min(Bx-b,x-g)=0; //! FICHIER A COMPLETER //- Initialisations: k=0; x=x0; err=eps+1; Id=speye(B); PRINT=0 while( keps ) k=k+1 xold=x; //- Definition de F=F(x) et de Fp=F'(x): //COMPLETER //- Definition nouvel x //COMPLETER //- Estimateur pour convergence err=norm(min(B*x-b,x-g),'inf'); if PRINT printf('k=%5i, err=%12.6f, n(x-xold)=%10.6f\n',k,err,norm(x-xold)); //scanf('%c'); end end endfunction