A modified transmission line equation (MTLE) for simulating the response of through-casing resistivity logging was computed by a recursive matrix method. The response of different formation models was simulated by the method, and the influence of such factors as cement layer, electrode spacing and heterogeneous casing was analyzed by the method. The results show that the method has a high resolution of axial formation boundaries. The low-conductivity cement layer has a great influence on the response in high-conductivity formation. The computed apparent conductivity is a composition of conductivities of all the layers in radial direction as there are many layers in this direction.