Out-of-equilibrium dynamics with matrix product states