function tm = ADtimestep(yitap, yitas, omega, dp, ds) dp = abs(dp); ds = abs(ds); tm1 = (1 + omega) * yitap ./ (dp + omega * yitap); tm2 = (1 + omega) * yitas ./ (ds + omega * yitas); tm = min(min(tm1),min(tm2));