fix function

MATLAB fix function