As has been mentioned, with the k's explicitly accounted for, it's very complicated.
But if you consider the matrix X simply as some constant matrix X, regardless of what's in it, then the analytical solution is
where x0 is the initial condition.
X = randn(3);
X = X*X';
X = -X;
x0 = [1;2;3];
Z = ;
tList = 0:0.01:3;
for t = tList;
Z(:,end+1) = expm(X*t)*x0;
title('Same answer with ode45 and expm')