Matlab and maxima code used for my MSc project