Resonant tunneling of electrons through a multiple potential barrier in a semiconductor heterostructure in the presence of both an oscillating in time and constant external electric fields is considered. In order to solve the problem numerically the concept of the scattering matrix is developed and a stable numerical algorithm is presented. Using this algorithm computations for different amplitudes and different spatial configurations of the fields are performed.