3 Plotting
Open and edit the script q3.m
provided to you to answer the parts of this question.
(a) [1 mark]
Make a column vector named yr
having the values 2009
through 2018
in steps of 1
. Your vector should have 10 elements.
(b) [1 mark]
Make a column vector named co2
having the following values (you can copy-and-paste the values):
386.9, 388.7, 391.3, 393.1, 395.5, 397.9, 400.0, 402.5, 406.1, 408.0
These values represent the atmospheric concentration of carbon dioxide in parts per million for January of each year from 2009 to 2018.
(c) [4 marks]
To the script add the MATLAB commands needed to plot the values in the vectors yr
and co2
to reproduce the following figure:
Running the script should reproduce the above figure exactly (including the limits of the axes).