Index: mttroot/mtt/lib/control/PPP/ppp_lin_run.m ================================================================== --- mttroot/mtt/lib/control/PPP/ppp_lin_run.m +++ mttroot/mtt/lib/control/PPP/ppp_lin_run.m @@ -262,16 +262,18 @@ for j=1:p_c.Iterations for k=1:I tim=time; # Timing i++; if Simulate # Exact simulation + X = x; # Current state t_sim = [1:p_c.N]*dt; # Simulation time points [yi,ui,xsi] = ppp_ystar(A,B,C,D,x,p_c.A_u,U,t_sim); # Simulate x = xsi(:,p_c.N); # Current state (for next time) ti = [(i-1)*p_c.N:i*p_c.N-1]*dt; y_i = yi(1); # Current output t_i = ti(1); + ##X = xsi(:,1); else # The real thing if strcmp(p_o.method, "remote") [t_i,y_i,X] = ppp_put_get_X(U); # Remote-state interface u_i = X(3); # Integrated control is third state else