Computational determination of wave operators from large Hamiltonian matrices