⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ind2vec.m

📁 模式识别工具箱,希望对大家有用!
💻 M
字号:
function v=ind2vec(i)%IND2VEC Convert indices to vectors.%%	Syntax%%	  vec = ind2vec(ind)%%	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.%%	  IND2VEC(IND) takes one argument,%	    IND - Row vector of indices.%	  and returns sparse matrix of vectors, with one 1 in%	  each column, as indicated by IND.%%	Examples%%	  Here four indices are defined and converted to vector%	  representation.%%	    ind = [1 3 2 3]%	    vec = ind2vec(ind)%%	See also VEC2IND.% Mark Beale, 2-15-96.% Copyright 1992-2000 The MathWorks, Inc.% $Revision: 1.7 $vectors = length(i);v = sparse(i,1:vectors,ones(1,vectors));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -