A method, system, apparatus, and computer readable medium has been provided with the ability to obtain a complex permittivity dielectric or a complex permeability micron of a sample in a cavity. One or more complex-valued resonance frequencies f(sub m) of the cavity, wherein each f(sub m) is a measurement, are obtained. Maxwell's equations are solved exactly for dielectric, and/or micron, using the f(sub m) as known quantities, thereby obtaining the dielectric and/or micron of the sample.