Converts a linear index to an array of subscripts.
The function accepts the following "modes":
0
array shape
linear index
function options
specifies how to handle a linear index which exceeds array dimensions (default: 'throw')
specifies whether an array is row-major (C-style) or column-major (Fortran-style) (default: 'row-major')
shape argument must be an array-like object containing nonnegative integers
must provide valid options
must provide a linear index which does not exceed array dimensions
subscripts
Converts a linear index to an array of subscripts.
Notes
The function accepts the following "modes":
0
(minimum linear index) or the maximum linear index.array shape
linear index
function options
specifies how to handle a linear index which exceeds array dimensions (default: 'throw')
specifies whether an array is row-major (C-style) or column-major (Fortran-style) (default: 'row-major')
shape argument must be an array-like object containing nonnegative integers
must provide valid options
must provide a linear index which does not exceed array dimensions
subscripts