Microbedded rocks have an anisotropic frequency‐dependent sound speed which depends on the intrinsic sound speeds of the individual microbeds and on the O'Doherty‐Anstey effect. Fractured rocks have an anisotropic frequency‐dependent sound speed which depends on the intrinsic sound speed of the unfractured rock, the frequency‐dependent phase shift that occurs during reflection or transmission across a fracture, and the interfracture O'Doherty‐Anstey effect. These effects are neglected by the quasistatic methods presently used to generate elastic constants. Here I introduce a new method for generating elastic constants that contain all the above effects. First, a statistical description of the rock is used to generate a sample of the rock. Then an exact two‐way method is used to propagate just a few plane waves, of frequency ƒ, a distance of several wavelengths from the source. If an equivalent homogeneous medium exists at frequency ƒ, then the computed motions must also satisfy a one‐way elastic wave equation for that equivalent medium. This one‐way wave equation is used to invert for the elastic coefficients. When no equivalent medium exists, perhaps because ƒ is too large, this is indicated by the inversion. Possible applications of the method are prediction of seismic sound speeds from measurements of bed thicknesses in cores; analysis of laboratory data for fracture constitutive relations; and inversion of multioffset vertical seismic profiling data for elastic coefficients comparable with those predicted from cores.