We extend the matrix-resolvent method of computing logarithmic derivatives of tau functions to the nonlinear Schrodinger (NLS) hierarchy. Based on this method we give a detailed proof of a theorem of Carlet, Dubrovin and Zhang regarding the relationship between the Toda lattice hierarchy and the NLS hierarchy. As an application, we give an improvement of an algorithm of computing correlators in hermitian matrix models.(C) 2022 Elsevier B.V. All rights reserved.