Matlab code for coastal fluid mechanics