Matlab script updated for spherical interpolation