A = [2, -4; 7, -9]; B = [0; 1]; C = eye(2); D = [0; 0]; x0 = [1; 0]; timeresp fprintf(1, 'Press any key after the simulation is finished\n'); pause % exact solution x1_calc = -2/5 + 3*exp(-2*t) - 8/5*exp(-5*t); x2_calc = -1/5 + 3*exp(-2*t) - 14/5*exp(-5*t); figure(1); plot(t, x(:,1), 'b', t, x1_calc, 'r--'); title('x1'); figure(2); plot(t, x(:,2), 'b', t, x2_calc, 'r--'); title('x2');