c_sub2ind function

Find 1D index given n-dimensional indices