Step function matlab code. These are tested and outputs are also added.