GI calculation using calibration method, in matlab.