Attenuation of elastic waves in one-dimensional inhomogeneous elastic media