# ind_to_sub

Version:

Converts the linear indexes of array elements to their row-column-page positions.

## Syntax

[a1, a2, ..., an] = ind_to_sub(size, a)
Legacy name: ind2sub

## size

Array size. size is an array of any dimension of integers. If necessary, MathScript flattens the array before it is used.

## a

Linear positions of elements in an array of the size you specify. a is an array of integers.

## a1

First dimension number of the element with the linear position a. a1 has the same size as a.

## a2

Second dimension number of the element with the linear position a. a2 has the same size as a.

## ...

Further dimension number of the element with the linear position a.

## an

Nth dimension number of the element with the linear position a.

A = [1, 2, 3; 4, 5, 6];
[a1, a2] = ind_to_sub(size(A), [1, 2])

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices