Computation of excited states for the nonlinear Schr{ö}dinger equation: numerical and theoretical analysis