adding calibration and correction MATLAB functions