  The dynamics of the inner disk of many galaxies is dominated by bars. As a
result, resonances between the bar and the disk become an important factor. In
order to detect resonances, we measure angular and radial frequencies of
individual orbits in N-body models of barred galaxies. In our simulations with
several million particles, stellar disks are immersed in live halos of dark
matter. A bar forms spontaneously and interacts with the disk through
resonances. We detect 9 of them. The corotation (CR) and the inner Lindblad
resonance (ILR) are the most significant. The spatial distributions of
particles trapped at these resonances show that ILR is not localized at a given
radius. Particles trapped at ILR lie along the bar spanning a wide range of
radii. On the other hand, particles at the corotation resonance form a ring
around the corotation radius. We study how orbits evolve near corotation and
how they are trapped. When an orbit is getting trapped, it evolves strongly,
but after that there is little evolution. Those trapped orbits circulate along
the corotation ring or librate around a stable lagragian point. The same
technique is applied to study resonances in the halo. The bar interacts
strongly with the halo particles that stay close to the disk. We find the
corotation resonance and the inner Lindblad resonance for halo particles.
