% % Simulation pour système TD2 % clear all close all theta0 = 2; r = 4; k = 0.1; M = 0.5; xmin = -3; ymin = -0.5; xmax = -xmin; ymax = -ymin; figure1 = figure; axes1 = axes('Parent',figure1); hold(axes1,'on'); box(axes1,'on'); grid(axes1,'on'); set(axes1,'FontSize',14); ylabel('$x_2$','FontSize',20,'Interpreter','latex'); xlabel('$x_1$','FontSize',20,'Interpreter','latex'); axis([xmin xmax ymin ymax]); hold on; for l = 1:5 [x10,x20] = ginput(1); % selection graphique des conditions initiales simout = sim('simDCmotorControl',[0 40]); % lancement du modele simulink x1 = simout.get('x1'); % 1er composante etat x x2 = simout.get('x2'); % 2nd composante etat x theta = simout.get('theta');% sortie du systeme theta tout = simout.get('tout'); % temps t % à compléter : mise à jour condition initiale theta et tracé traj dans % plan de phase drawnow end