A local coil for an imaging system includes a number of shim coils. A current for generating a shim field in one of the shim coils may be switched on and switched off. A current for generating a shim field in another of the shim coils may be switched on and switched off. The currents may be switched on and switched off independently of one another for generating a respective shim field in the shim coils.