Main Content
ind2vec
Convert indices to vectors
Description
takes
a row vector of indices, vec
= ind2vec(ind
)ind
, and returns a sparse matrix of vectors,
vec
, containing a 1
in the row of the index they
represent, as indicated by ind
.
ind2vec
and vec2ind
allow indices to be
represented either by themselves, or as vectors containing a 1 in the row of the index they
represent.
Examples
Input Arguments
Output Arguments
Version History
Introduced before R2006a