MATLAB Function Reference | Search  Help Desk |
ind2sub | Examples See Also |
[I,J] = ind2sub(Thesiz
,IND) [I1,I2,I3,...,In] = ind2sub(siz
,IND)
ind2sub
command determines the equivalent subscript values corresponding to a single index into an array.
[I,J] = ind2sub(
returns the arrays siz
,IND)
I
and J
containing the equivalent row and column subscripts corresponding to the index matrix IND
for a matrix of size siz
.
[I,J] = ind2sub(size(A),find(A>5))
returns the same values as [I,J] = find(A>5)
.
[I1,I2,I3,...,In] = ind2sub(
returns siz
,IND)
n
subscript arrays I1
,I2
,..,In
containing the equivalent multidimensional array subscripts equivalent to IND
for an array of size siz
.
sub2ind
Single index from subscripts
find
Find indices and values of nonzero elements