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

📄 som_cod2ind.m

📁 it is matlab code , som(slef organizing map) tool for matlab
💻 M
字号:
function ind = som_cod2ind(msize,cind)%SOM_COD2IND Matlab linear index from SOM_PAK style linear indeces.%% ind = som_cod2ind(msize,cind)%%  ind = som_cod2ind([10 15],44);%  ind = som_cod2ind(sMap,44);%  ind = som_cod2ind(sMap.msize,44);%  ind = som_cod2ind([10 15],[44 13 91]');%%  Input and output arguments: %   msize  (struct) map or topology struct%          (vector) size 1 x m, specifies the map grid size%   cind   (vector) size n x 1, SOM_PAK style linear indeces for n map units%                   (row first, then column)% %   ind    (vector) size n x 1, Matlab linear indeces%% See also SOM_IND2COD.% Contributed to SOM Toolbox vs2, January 14th, 2002 by Juha Vesanto% http://www.cis.hut.fi/projects/somtoolbox/% Version 2.0beta juuso 140102%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if isstruct(msize),   if strcmp(msize.type,'som_map'), msize = msize.topol.msize;   elseif strcmp(msize.type,'som_topol'), msize = msize.msize;  else error('Invalid first argument.'); endendif nargin<2, cind = 1:prod(msize); endI2C = som_ind2cod(msize,[1:prod(msize)]); [dummy,C2I] = sort(I2C); ind = C2I(cind); return; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

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