I have derived two equations describing the forced vibration of a coupled harmonic oscillator system.
Coupled Equations

A colleague of mine suggested using: $Ax = B$. However, I don't know how to implement that to this specific case or if it even applies.
I plan on solving this in Matlab, but would like to know how to arrange these equations into matrix notation to solve for the velocities.
I'm going to use primes instead of dots for derivatives. I'm going to introduce new letters to stand for your basic functions and their derivatives: $u$ will stand for $x_s$, $v$ for $x_s'$, $w$ for $x_m$, and $z$ for $x_m'$. Then your equations can be rewritten in the form $u'=v$, $v'=au+bv+cw+dz+e$, $w'=z$, $z'=fu+gv+hw+iz+j$ for some constants $a,b,c,d,e,f,g,h,i,j$. If you let $X$ be the vector $(u,v,w,z)$, then you can write these four linear equations as a matrix equation $X'=AX+B$ for some matrix $A$ and some vector $B$, the entries of $A$ and $B$ being constants.