  We study the electronic properties of 2D electron gas (2DEG) with quadratic
dispersion and with relativistic dispersion as in graphene in the inhomogeneous
magnetic field consisting of the Aharonov-Bohm flux and a constant background
field. The total and local density of states (LDOS) are obtained on the base of
the analytic solutions of the Schr\"{o}dinger and Dirac equations in the
inhomogeneous magnetic field. It is shown that as it was in the situation with
a pure Aharonov-Bohm flux, in the case of graphene there is an excess of LDOS
near the vortex, while in 2DEG the LDOS is depleted. This results in excess of
the induced by the vortex DOS in graphene and in its depletion in 2DEG.
