matlab code to plot task3 graph