Matlab saturation function m file