Skip to content

columns

Number of columns in a reference.

v = columns(arr)

Returns the number of columns in arr. Equivalent to size(arr, 2).

columns([1 2 3; 4 5 6]) % 3
  • rows — Number of rows in a reference.
  • column — Column number of a reference.
  • size — Sizes along all dimensions, or along one specific dimension.