add functions to fit a sigmoid to a vector and to match two vectors in 1D; allow vtransitions to be restricted to a value range