Change of magnetic field wherein the magnet and switch are fixed