Matlab implementation of Sequential coordinate-wise algorithm.