recserrc ============================================== Purpose ---------------- Computes a recursive series involving division. Format ---------------- .. function:: y = recserrc(x, z) :param x: data :type x: 1xK or Kx1 vector :param z: data :type z: NxK matrix :return y: Each column is a series generated by a recursion of the form: :: y[1] = x mod z[1], x = trunc(x/z[1]) y[2] = x mod z[2], x = trunc(x/z[2]) y[3] = x mod z[3], x = trunc(x/z[3])    .    . . y[n] = x mod z[n] :rtype y: NxK matrix Examples ---------------- :: x = 2|8|10; b = 2; n = maxc(log(x)./log(b) ) + 1; z = reshape(b, n, rows(x)); y = rev(recserrc(x, z) )'; The result, *y*, will contain in its rows (note that it is transposed in the last step) the digits representing the decimal numbers 2, 8, and 10 in base 2: :: 0 0 1 0 1 0 0 0 1 0 1 0 Remarks ------- Can be used to convert from decimal to other number systems (radix conversion). Source ------ recserrc.src .. seealso:: Functions :func:`recserar`, :func:`recsercp`, :func:`recserVAR`