The algorithms of extracting the Lorentzianand Debye-curve parameters of dielectric and magnetic materials from the results of measurements at several frequency points are presented. These algorithms are based on an analytical solution of systems of non-linear equations with physical constraints that follow from the fundamental principle of causality. The extracted parameters are useful for FDTD modeling of electromagnetic structures containing such dispersive media. Some examples are presented