  We suggest the numerical approach to detect eigenfrequencies of trapped modes
in waveguides or guided waves in diffraction gratings. At the same time, the
approach works perfectly for computation of systems with finitely many
scattering channels. The most attractive example concerns the possibility of
control on electron transport in nano-dimensions system consisting of a
resonator and finitely many adjoined channels due to external variable electric
field.
