clear Simu_Phase_2 figure(1) clf axis([-4 4 -4 4]) hold on xsing = [1 2 1 -1 -2 -1 2 -2] ysing = [2 1 -2 -2 -1 2 -1 1] for ind = 1:8 x = xsing(ind); y = ysing(ind); Mat = [2*x*y^2 2*y*x^2;2*x 2*y]; [Vec,Val]=eig(Mat); if (isreal(Val(1,1))) plot(x,y,'ob',[x x+Vec(1,1)],[y y+Vec(2,1)],':b',[x x+Vec(1,2)],[y y+Vec(2,2)],':b',... [x x-Vec(1,1)],[y y-Vec(2,1)],':b',[x x-Vec(1,2)],[y y-Vec(2,2)],':b'); else plot(x,y,'ok') end end Nb = input('Nombre de simulations : '); for i =1 : Nb [x0 ,y0]=ginput(1) sim('Simu_Phase_2',[0 10]) t= plot(x,y,'r',x0,y0,'*g') end