I am trying to design the split ring resonator proposed in Electromagnetic parameter retrieval from inhomogeneous metamaterials i.e FIG-2 of the paper in HFSS-11.After simulation i got exact match in magnitude and phase response of S parameter but when i try to extract permittivity and permeability using equation 9 and 10 mentioned in the above paper i am not getting proper response.I am using a matlab code to extract mu and epsilon from scattering parameter. I had attached all the required files.Any suggestion will be of great help for me.
I modified my code slightly.Now i am getting probably correct value of impedance z .But still imaginary part of index of refraction is wrong.I had attached my current code.Can some body tell me where i am going wrong?