This is the tutorial for ass4 2019.
You are provided a file called ass4_shell_2019.m
that contains most of the MatLab code for this
assignment. YES you should read it and use any
variables you need in your program. This program
has code that reads the climate data for you.
Average, sum of maximum of rain and snow (scale
by 0.1) and maximum precipitation are
computed for you.
You have 2 tasks (questions) for this assignment:
(1) Compute a graph for each month showing errorbars for the monthly
average precipitation values. The minimum and maximum error bars
are the sum of the maximum of rain and snow (scale by 0.1)
and the maximum precipitation for each year.
Use errorbar(X,Y,L,R)
where X is an array of the years,
Y is an array of the average monthly precipitation,
L is the sum of the maximum of the rain and snow (multiply by 0.1)
values minimum monthly temperature and
R is the maximum monthly precipitation value.
Theoretically L and R should be equal but often are not.
(2) Compute the curves of various orders to show how average
precipitation has changed over time (1941-2013). Use polyfit
and polyval to plot these curves for orders 1 (linear),
2 (quadratic), 3 (cubic), 4 (quartic) and 5 (quintic).
Use the color schemes on the assignment handout for your graphs.
Your program should produce the same graphs on the assignment handout
(there are 4 graphs there) plus another 20 graphs. Do NOT pass in the graphs, rather
just pass in one file, ass4_2019.m.Running this code should produce the 24 required graphs.
There are 2 comments in ass4_shell_2019.m, replace them with the code to
produce the graphs.