Subplot Exercise

This page contains two exercises. Make sure you have a look at both of them.
 

Exercise 3.1
Complete Worked Exercise 3.1 by writing commands for the cos and tan functions. You will notice that your tan graphs will look weird so you may want to introduce a new set of limits for them.

Hint: For your tan plots, you could use the new limits:

x1 = -(pi/2)+0.01:0.01:(pi/2)-0.01

Check your answers with  sin_cos_tan_sol.m (within the attached zip file).

Download:

 

Exercise 3.2
Would you be able to make the graphs look fancier by using titles? Play around with the title and the suptitle commands (refer to the MATLAB documentation, or simply look at the M-file in the attacked zip file to intuitively learn). Feel free to change the code around so that you understand what those commands do.

Download: