xudong chen metamaterial matlab code
I'm working on the similar problem and it is a very tricky issue. You have to be very careful since each method has some weakness due to certain assumptions and approximations. Structure geometry and symmetry properties have important influence on the extracted parameters. There are equations with multiple branches and roots. You must select the branch visely. Here are a few papers to consider:
"Determination of effective permittivity and permeability of metamaterials from reflection and transmission coefficients" by D. R. Smith, S. Schultz, P. Markos, and C. M. Soukoulis
"Electromagnetic parameter retrieval from inhomogeneous metamaterials" by D. R. Smith, D. C. Vier, Th. Koschny, and C. M. Soukoulis
"Robust method to retrieve the constitutive effective parameters of metamaterials" by Xudong Chen, Tomasz M. Grzegorczyk, Bae-Ian Wu, Joe Pacheco, Jr., and Jin Au Kong