Products & Services Solutions Academia Support User Community Company


vec2ind

Purpose

Convert vectors to indices

Syntax

Description

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.

vec2ind(vec) takes one argument,

vec
Matrix of vectors, each containing a single 1

and returns the indices of the 1s.

Examples

Here four vectors (each containing only one "1" element) are defined, and the indices of the 1s are found.

See Also

ind2vec


 Provide feedback about this page 

Previous page tribas view Next page

Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS