Which indices of the implicit array are given in x
n
Dimensions of implicit array.
careful
logical indicating whether to check vailidty of other arguments or work
quickly (mainly for recursion)
Value
A vector of length prod(n) containing suitably repeated and ordered elements of x.
Details
This function allows for complex repeating patterns. Consider an array with dimensions n; then for each value of the dimensions in which (contained in x), this function returns the pattern of values in which for each entry in the larger array.
Hence the length of x must be equal to prod(n[which]).