Added code MATLAB/Octave code for Mid-term 2