A matrix shim system for generating magnetic field components superimposed
on a main static magnetic field, comprising a plurality of annular coils,
is characterized in that it comprises g groups G.sub.1 . . . G.sub.g of
coils, with g being a natural number .gtoreq.1, wherein each group
G.sub.i consists of at least two single annular coils connected in
series, wherein each group G.sub.i is designed to generate, in use, a
magnetic field B z .function. ( G i ) = n = 0 .infin.
.times. A n .times. .times. 0 .function. ( G i ) T n
.times. .times. 0 . For each group G.sub.i, there are at least
two values of n for which A n .times. .times. 0
.function. ( G i ) R n { A 20 .function. ( G i )
R 2 , .times. , A N .times. .times. 0 .function. (
G i ) R N } .gtoreq. 0.5 .times. .times. and .times.
.times. N .gtoreq. n .gtoreq. 2 ,with N: the total number of current
supplies of the matrix shim system, and R: smallest inside radius of any
of the annular coils of the matrix shim system. An individual, adjustable
electrical current supply is provided for each group G.sub.i of coils.
The inventive matrix shim system is both simple in design and stable
against current fluctuations.