function stated = MassSpring(t, state)
% unpack the state vector
x = state(1);
xd = state(2);
% these are our constants
k = 2.5; % Newtons per metre
m = 1.5; % Kilograms
g = 9.8; % metres per second
% compute acceleration xdd
xdd = ((-k*x)/m) + g;
stated = [xd; xdd];
end