Band

Band[{i, j}]
represents the sequence of positions on the diagonal band that starts with in a sparse array.

Band[{imin, jmin, ...}, {imax, jmax, ...}]
represents the positions between and .

Band[{imin, jmin, ...}, {imax, jmax, ...}, {di, dj, ...}]
represents positions starting with and then moving with step .

DetailsDetails

  • Band[pos]->v represents values v that repeat along the diagonal band starting at pos.
  • Band[pos]->{v1, v2, ...} represents a sequence of values along the diagonal band starting at pos.
  • With an array a of the same rank as the whole sparse array, Band[start]->a by default inserts a at the position specified by start.
  • With arrays of the same rank as the whole sparse array, Band[pos]->{a1, a2, ...} represents a sequence of non-overlapping subarrays.
  • Band[start] is effectively equivalent to Band[start, {-1, -1, ...}].
  • For scalar values, Band[start, end] is equivalent to Band[start, end, {1, 1, ...}].
  • Band[start, end, step] stops when any coordinate first exceeds its value in end.
  • Band[start, end]->{v1, v2, ...} takes the values to repeat cyclically until end is reached.
  • Band[start, Automatic, step]->a continues until the edge of the array is reached.
  • Band[start, Automatic, step]->{v1, v2, ...} continues until the are exhausted.
New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »