Diffusion Model Step Function In Matlab