forum smith robust retrieval technique code
There is probably no "simple" way for you to do this, but there are some relatively straightforward methods. The question you are asking is referred to as "effective medium theory" or "homogenization" in the literature.
If your meta-material is a random collection of dielectric particles, you could look into Maxwell-Garnett or Bruggemann theories. These are very easy equations to use to compute effective refractive index (actually effective dielectric constant). I provide a simple summary of these in Chapter 13 of my dissertation. See pages 276 to 279.
If your meta-material is better described as a photonic crystal, there are several approaches you can take. The simplest essentially calculates a weighted average of the refractive index. These are accurate when the wavelength is much longer than the period of your lattice, but cannot always for the contribution of resonance to the effective refractive index. I do not discuss these approaches in my dissertation, but searching the literature for "effective medium theory" will turn up lots of papers for you.
The next level of complexity involves using a numerical model. For dielectric structures, the plane wave expansion method works well and there are some codes available online. I devote all of chapter 5 in my dissertation to this method. For metallic structures, the transfer-matrix-method will work well for you. In either case, your effective refractive index is determined by solving an eigen-value problem. I discuss this somewhat indirectly in my dissertation in section 2.4.3 (pp. 47-50) when I describe how to determine group and phase indices of refraction. The problem with this approach is that there is a built in assumption that the photonic crystal is of infinite extent. It turns out that the effective index of finite size devices changes a bit from the infinitely periodic case.
Perhaps the most complicated, but most accurate, is to apply a scattering numerical model such as rigorous coupled-wave analysis (RCWA) for dielectric structures, or the transfer-matrix-method for metallic structures. You model scattering from your device, then through equations or more modeling, determine what the effective index was. Think of it this way, keep replacing your structure with a homogeneous material and adjust the refractive index until you get the same reflectance and transmittance as you did with your original meta-material. I devote all of Chapter 6 to RCWA, but unfortunately do not discuss transfer-matrices or how to calculate effective index of refraction as I described here.
This discussion should get you started and hopefully doing a literature search with the right key words will turn up some good papers for you.
Good luck!
-Tip
P.S. If you are interested, my dissertation can be downloaded at: