Matlab functions for Ca signal analysis