Hirukawa's step generator MATLAB