We describe a new, spectrally accurate method for solving matrix-valued Riemann-Hilbert problems numerically. The effectiveness of this approach is demonstrated by computing solutions to the homogeneous Painlevé II equation. This can be used to relate initial conditions with asymptotic behavior.