
A = [0, 1, 0, 0;
     0, 0, 1, 0;
     0, 0, 0, 1;
     -300, -340, -131, -20];
C = [1, 0, 0, 0];

% eig(A)

[V, L] = eig(A);

t = linspace(0, 50, 1000);

x1 = null(V(:, 1:3)'); % Want a vector that's orthogonal to the largest three
y1 = zeros(1, length(t));

% x2 = V(:, 3);
% x2 = [1; 0; 0; 0];
x2 = diag(L);
x2 = -x2 / norm(x2);

y2 = y1;

for ii = 1:length(t)
  y1(ii) = C * expm(A*t(ii)) * x1;
  y2(ii) = C * expm(A*t(ii)) * x2;
end

plot(t, y1, t, y2);
legend('slowest', 'another');


