We report measurements on transport in a two-dimensional electron gas
(2DEG) subject to an inhomogeneous magnetic field. To achieve the inho
mogeneous magnetic held we randomly distributed superconducting lead (
Pb) grains on the surface of the samples. In magnetic fields below the
critical field for lead, the externally applied magnetic flux is eith
er expelled from or trapped in the lead grains, and thus gives rise to
inhomogeneities in the overall flux density penetrating the 2DEG. Thi
s inhomogeneous magnetic field causes a characteristic magnetoresistan
ce with either one or two peaks, and a pronounced hysteresis of the pe
ak positions.