ind = sub2ind(sz, row, col)
ind = sub2ind(sz, I1, I2, ..., In)
| Parameter | Description |
|---|---|
| sz | size of array: vector of positive integers. |
| row | row subscripts. |
| col | column subscripts. |
| I1, I2, ..., In | multidimensional subscripts. |
| Parameter | Description |
|---|---|
| ind | linear indices. |
ind2sub converts subscripts to linear indices. .
row = [2 3 4 2];
col = [2 2 2 3];
sz = [3 3];
ind = sub2ind(sz, row, col)
| Version | Description |
|---|---|
| 1.0.0 | initial version |