fixed interp1gsy function