If I'm understanding your question correctly, you're trying to calculatte an effective medium tensor of the form:
where
Usually
,
, and
are fill fractions for each composite material and have values in the range of 0 to 1, but I could just be unfamiliar with the exact effective medium model you're using. I've also never encountered a material with only one dispersive (varies with frequency) tensor element. Usually each tensor element is dispersive. Assuming this is the case, however, the code you're looking for is:
e_eff = zeros(3,3,length(w));
e_eff(1,1,:) = e0*e_TE(:);
e_eff(2,2,:) = e0*e_TE(:);
e_eff(3,3,:) = e0*e_TM(:);
This creates a permittivity tensor that follows the effective medium model at each frequency w you've provided.
Also, I noticed you wanted to plot the effective tensor with:
plot(lambda,real(e_eff),'b',lambda,imag(e_eff),'g')
legend('real','Im','Location','southeast');
xlabel('Wavelength (nm)');
ylabel('Effective Permittivity');
MATLAB will error out saying "Data cannot have more than 2 dimensions" since you're attempting to plot 9 tensor elements per wavelength. If you could clarify what exactly you're trying to plot, I might be able to assist further.