Simulation exercise

Click Simulation_exercise.m link to view the file.