<< squeeze | Elementary functions | substruct >> |
ind = sub2ind(sz, row, col) |
ind = sub2ind(sz, I1, I2, ..., In) |
size of array: vector of positive integers.
row subscripts.
column subscripts.
multidimensional subscripts.
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 |
Allan CORNET