We used an exact analytical approach to investigate the electromagnetic wave propagation across an isotropic metamaterial composite with i. a sinusoidally periodic gradient of the real parts of the effective permittivity and permeability, ii. spatially uniform imaginary parts of the effective permittivity and permeability, and iii. spatially uniform impedance. The real part of the effective refractive index can be positive and negative along the direction of nonhomogeneity. A remarkably simple direct solution for the field distribution was obtained.