A Retrieval Method of Effective Electromagnetic Parameters for Inhomogeneous Metamaterials