There appears to be 2 straightforward approaches:
1. For c1=c/2m, k1=k/m and sufficiently small dt(i) = t(i)-t(i-1)
a. Obtain an inhomogeneous system of linear equations for C = [c1 ; k1] by converting the differential equation to a difference equation in x(i).
b. Obtain the solution to A*C=B via C = A\B.
2. Use NLINFIT or LSQCURVEFIT to estimate c1, k1, A and B from the form of the exact solution
x(i) = exp(-c1*t(i)) * ( A * cos( sqrt(c1^2-k1) * t(i))
+ B * sin( sqrt(c1^2-k1) * (t(i) )
However, since the equation is linear in A and B, a two step estimation of [c1 ; k1 ] and [ A B] might be useful.
Hope this helps.