Added Matlab code that was used for simulation.