Answers to these exercises are available here. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page.
Recall the previous initial values of all parameters (t,k,S,ntimesteps, time step). It is better to use the same script as the previous exercise so that we can directly compare the original models to the modified one (based on error fixing approach on this exercise). Create a new empty matrix to store the following result of the calculation.
Create a loop of calculation that includes the rounding up process.
Plot the revised model on the same graph as the plot of the original model. Make notes of the performance of the model and where the error on the model occurred.
Now, what happens if we change the time step? Recall all parameters on the original model, but change the final time step. Create a new output matrix for the output.
Re-run the loop with the new parameter.
Re-plot the original model and plot the time step reduced model. Models with longer time steps simulate lower water levels; why? How do we investigate which one is closer to the correct values?
Create a regression equation from the data-set. Use it to compare results from analytical (regression equation) and the latest revised model visually. What can be inferred from it?