A general method, which we call the potential S-matrix pole method, is developed for obtaining the S-matrix pole parameters for bound, virtual, and resonant states based on numerical solutions of the Schrödinger equation. This method is well known for bound states. In this work we generalize it for resonant and virtual states, although the corresponding solutions increase exponentially when r → ∞. Concrete calculations are performed for the 1 + ground state of 14 N, the resonance 15 F states (1/2 + , 5/2 + ), low-lying states of 11 Be and 11 N, and the subthreshold resonance in the proton-proton system. We also demonstrate that in the case of broad resonances, their energy and width can be found from the fitting the experimental phase shifts using the analytical expression for the elastic-scattering S matrix. We compare the S-matrix pole and the R matrix methods for broad resonances in the 14 O-p and in 26 Mg-n systems.A. M. MUKHAMEDZHANOV et al. PHYSICAL REVIEW C 81, 054314 (2010)