A flexible and effective algorithm for complex roots and poles finding is presented. A wide class of analytic functions can be analyzed, and any arbitrarily shaped search region can be considered. The method is very simple and intuitive. It is based on sampling a function at the nodes of a regular mesh, and on the analysis of the function phase. As a result, a set of candidate regions is created and then the roots/poles are verified using a discretized Cauchy's argument principle. The accuracy of the results can be improved by the application of a self-adaptive mesh. The effectiveness of the presented technique is supported by numerical tests involving different types of structures, where electromagnetic waves are guided and radiated. The results are verified, and the computational efficiency of the method is examined.Index Terms-Complex roots finding algorithm, complex modes, propagation, radiation corresponds to mesh resolution ∆r = 0.15 and, obviously, any higher resolution leads to the same results -twelve single roots: z (1) = −0.096642302459942 − 0.062923397455697i, z (2) = −0.096642302459942 + 0.062923397455697i, z (3) = 0.096642302459942 − 0.062923397455697i, z (4) = 0.096642302459942 + 0.062923397455696i, z (5) = −0.444429043110023 + 0.000000000000000i, z (6) = 0.444429043110023 − 0.000000000000000i, z (7) = −0.703772250217811 + 0.000000000000000i, z (8) = 0.703772250217811 − 0.000000000000000i, z (9) = −0.775021522202022 + 0.000000000000000i, z (10) = 0.775021522202023 − 0.000000000000000i, z (11) = −0.856115203911565 + 0.000000000000000i, z (12) = 0.856115203911564 − 0.000000000000000i and two second order poles: z (13) = 0.000000000000000 + 0.100000000000000i, z (14) = 0.000000000000000 − 0.100000000000000i. The parameters and results of the analysis for various accuracy δ are collected in Table I and in Figure 3.Similar discrete algorithm [22] requires 721 samples (corresponds to ∆r = 0.06) for the initial mesh and this number