% # This funtion returns reflection times % # Input parameters: % # t0- normal-incidence reflection time (can be an array) % # v_stacking - stacking velocity; % # x - source-receiver distance (can be an scalar or array, % # but if array, it shoudl have the same length as t0) function [t_reflect] = trefl(t0,v_stacking,x) t_reflect = sqrt(t0.^2+(x/v_stacking).^2); end