This magnet device (2) is provided with a pair of generally disk-shaped magnetic poles (4U) situated in opposition, and a yoke (3) which is C-shaped or U-shaped in side view and which is situated with either end of the C-shape or U-shape situated in proximity to the magnetic poles (4U). The yoke (3) has a yoke-side opposing portion (15U) in proximity to and opposing the magnetic poles (4U), the yoke-side opposing portion (15U) having a center strip area (15b) that includes part of a vertical symmetric plane (&alpha) of the yoke (3), and side strip areas (15c) situated to either side of the center strip area (15b), further away from the vertical symmetric plane (&alpha). At a height (W3) of the yoke-side opposing portion (15U) with respect to a yoke-side opposing surface (15a) which is situated in proximity and opposing the magnetic poles (4U), the center strip area (15c, W3b) is taller than the side strip areas (15c, W3c). The height (W3) of the yoke-side opposing portion (15U) with respect to the yoke-side opposing surface (15a) decreases in weakly monotonic fashion further away from the vertical symmetric plane (&alpha), and the maximum value and minimum value thereof differ.