亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? som_colorcode.m

?? it is matlab code , som(slef organizing map) tool for matlab
?? M
字號:
function colors=som_colorcode(m, colorcode, scaling)%SOM_COLORCODE Calculates a heuristic color coding for the SOM grid%% colors = som_colorcode(m, colorcode, scaling) %%  Input and output arguments ([]'s are optional):%   m           (struct) map or topol struct%               (cell array) of form {str,[m1 m2]} where %                        str = 'hexa' or 'rect' and [m1 m2] = msize%               (matrix) size N x 2, unit coordinates %   [colorcode] (string) 'rgb1' (default),'rgb2','rgb3','rgb4','hsv'  %   [scaling]   (scalar) 1=on (default), 0=off. Has effect only%                        if m is a Nx2 matrix of coordinates: %                        controls whether these are scaled to %                        range [0,1] or not.%%   colors      (matrix) size N x 3, RGB colors for each unit (or point)%% The function gives a color coding by location for the map grid % (or arbitrary set of points). Map grid coordinates are always linearly % normalized to a unit square (x and y coordinates between [0,1]), except% if m is a Nx2 matrix and scaling=0. In that case too, the coordinates% must be in range [0,1].% % Following heuristic color codings are available:%%  'rgb1' slice of RGB-cube so that       green - yellow%         the corners have colors:          |       |%                                         blue  - magenta%%  'rgb2' slice of RGB-cube so that       red   - yellow%         the corners have colors:          |       |%                                         blue  - cyan   %%  'rgb3' slice of RGB-cube so that   mixed_green - orange%         the corners have colors:          |        |%                                     light_blue  - pink %%  'rgb4' has 'rgb1' on the diagonal + additional colors in corners%         (more resolution but visually strongly discontinuous) %%  'hsv'  angle and radius from map centre are coded by hue and %         intensity (more resoluton but visually discontinuous)%% See also SOM_CPLANE, SOM_SHOW, SOM_CLUSTERCOLOR, SOM_KMEANSCOLOR, %          SOM_BMUCOLOR.% Contributed to SOM Toolbox 2.0, February 11th, 2000 by Johan Himberg% Copyright (c) by Johan Himberg% http://www.cis.hut.fi/projects/somtoolbox/% Version 2.0 Johan 140799 %%% Check arguments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%error(nargchk(1, 3, nargin));   % check no. of input args is correct%% Check m: map, topol, cell or data?if vis_valuetype(m,{'nx2'}),  p=m;  % explicit coordinates  else    % map, topol, cell    [tmp,ok,tmp]=som_set(m);  if isstruct(m) & all(ok)    switch m.type    case 'som_topol'              % topol       msize=m.msize;      lattice=m.lattice;    case 'som_map'         msize=m.topol.msize;        % map      lattice=m.topol.lattice;    otherwise      error('Invalid map or topol struct.');    end  % cell        elseif iscell(m) & vis_valuetype(size(m),{[1 2]}),    if vis_valuetype(m{2},{[1 2]}) & vis_valuetype(m{1},{'string'}),      lattice=m{1};          msize=m{2};     else      error('Invalid map size information.');    end  end  %% Check map parameters   switch lattice                   % lattice    case 'hexa'     ;  case 'rect'    ;  otherwise    error('Unknown lattice type');  end    if length(msize)>2                % dimension    error('Only 2D maps allowed!');  end                                         % Calculate coordinates   p=som_unit_coords(msize,lattice,'sheet');  % Set scaling to 1 as it is done always in this case  scaling=1;   end% Check colorcodeif nargin < 2 | isempty(colorcode),  colorcode='rgb1';endif ~ischar(colorcode)  error('String value for colorcode mode expected.');else switch colorcode case { 'rgb1', 'rgb2', 'rgb3' , 'rgb4' ,'hsv'}  otherwise    error([ 'Colorcode mode ' colorcode ' not implemented.']);  endend% Check scalingif nargin < 3 | isempty(scaling)   scaling=1;endif ~vis_valuetype(scaling,{'1x1'})  error('Scaling should be 0 (off) or 1 (on).');end%% Action %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% scale coordintes between [0,1]if scaling    n=size(p,1);  mn=min(p);  e=max(p)-mn;  p=(p-repmat(mn,n,1))./repmat(e,n,1);elseif sum(p(:,1)>1+p(:,1)<0+p(:,2)>1+p(:,2)<0),    error('Coordinates out of range [0,1].');endswitch colorcode case 'rgb1'  h(:,1)=p(:,1);  h(:,2)=1-p(:,2);  h(:,3)=p(:,2);case 'rgb2'  h(:,1)=p(:,1);  h(:,2)=1-p(:,2);  h(:,3)=1-p(:,1);case 'rgb3'  h(:,1)=p(:,1);  h(:,2)=.5;  h(:,3)=p(:,2);case 'rgb4'   p=rgb4(p); h(:,1)=p(:,1); h(:,2)=1-p(:,2); h(:,3)=p(:,3);case 'hsv'  munits = n;  Hsv = zeros(munits,3);  for i=1:n,     dx = .5-p(i,1);    dy = .5-p(i,2);    r = sqrt(dx^2+dy^2);    if r==0,       h=1;     elseif dx==0,       h=.5; %h=ay;     elseif dy==0,       h=.5; %h=ax;     else       h = min(abs(.5/(dx/r)),abs(.5/(dy/r)));     end        if r==0,       angle = 0;     else       angle = acos(dx/r);       if dy<0, 	angle = 2*pi-angle;       end    end        Hsv(i,1) = 1-sin(angle/4);    Hsv(i,2) = 1;    Hsv(i,3) = r/h;     h = hsv2rgb(Hsv);  endend%% Build output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%colors=h;%% Subfunctions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% juha %%%%function p=rgb4(coord)for i=1:size(coord,1); p(i,:)=get_coords(coord(i,:))';end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function coords=get_coords(coords)%GET_COORDS%% get_coords(coords)%% ARGUMENTS%% coords (1x2 or 2x1 vector) coords(1) is an x-coordinate and coords(2)%                            y-coordinate.%%% RETURNS%% coords (3x1 vector) x,y and z-coordinates.%if ~(all(size(coords) == [1 2]) | all(size(coords) == [2 1]))  error('Argument ''coords'' must be an 2x1 or 1x2 vector.');endif all(size(coords) == [1 2])  coords=coords';endif any(coords > 1) any(coords < 0)  error('Coordinates must lay inside the interval [0,1].');endif coords(1) <= 1/(sqrt(2)+1),  if coords(2) <= line3(coords(1))    coords=coords_in_base(4,coords);  elseif coords(2) <= line2(coords(1))    coords=coords_in_base(1,coords);  else    coords=coords_in_base(2,coords);  endelseif coords(1) <= sqrt(2)/(sqrt(2)+1)  if coords(2) <= line1(coords(1))    coords=coords_in_base(3,coords);  elseif coords(2) <= line2(coords(1))    coords=coords_in_base(1,coords);  else    coords=coords_in_base(2,coords);  endelse  if coords(2) <= line1(coords(1)),    coords=coords_in_base(3,coords);  elseif coords(2) <= line4(coords(1))    coords=coords_in_base(1,coords);  else    coords=coords_in_base(5,coords);  endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function coords=coords_in_base(base_no,coords)A=[0;1/(sqrt(2)+1)];E=[1;1];F=[0;0];G=[1;0];H=[0;1];const=1+1/sqrt(2);switch base_no  case 1    x=(coords-A)*const;    coords=[(1/sqrt(2))*(x(1)-x(2));0.5*(x(1)+x(2));0.5*(x(1)+x(2))];  case 2    x=(coords-H)*const;    coords=[0;x(1);1+x(2)];  case 3    x=(coords-G)*const;    coords=[1;1+x(1);x(2)];  case 4    x=(coords-F)*const;    coords=[0.5+(1/sqrt(2))*(x(1)-x(2));...            0.5-(1/sqrt(2))*(x(1)+x(2));...             0];  case 5    x=(coords-E)*const;    coords=[0.5+(1/sqrt(2))*(x(1)-x(2));...            0.5-(1/sqrt(2))*(x(1)+x(2));...                  1];end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function y=line1(x)  y = x-1/(sqrt(2)+1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function y=line2(x)y = x+1/(sqrt(2)+1); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function y=line3(x)y = -x+1/(sqrt(2)+1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function y= line4(x)y = -x+(2*sqrt(2)+1)/(sqrt(2)+1);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆免费看一区二区三区| 亚洲女爱视频在线| 久久99精品国产91久久来源| 91精品欧美福利在线观看 | 久久久精品影视| 国产黄色91视频| 中文字幕在线一区免费| 91在线porny国产在线看| 亚洲美女视频在线| 欧美日韩大陆在线| 玖玖九九国产精品| 国产欧美精品一区| av激情成人网| 亚洲国产一区二区视频| 在线亚洲一区二区| 洋洋av久久久久久久一区| 在线观看免费成人| 亚洲第四色夜色| 欧美日韩国产一二三| 日韩**一区毛片| 精品少妇一区二区三区在线播放| 免费人成黄页网站在线一区二区| 日韩视频一区二区三区在线播放 | 136国产福利精品导航| 日本韩国欧美三级| 韩日精品视频一区| 亚洲欧美韩国综合色| 91精品国产乱| 99久久精品一区| 免费在线观看视频一区| 1024国产精品| 精品99一区二区三区| 91在线观看一区二区| 日本亚洲天堂网| 国产精品大尺度| 欧美一级高清片在线观看| 国产精品66部| 亚洲国产精品久久人人爱蜜臀| 久久综合九色综合97婷婷女人| 日本韩国一区二区三区| 国产一区二区美女| 亚洲午夜一区二区三区| 国产欧美一区视频| 欧美日韩精品福利| 99综合影院在线| 国产在线精品一区二区| 亚洲国产精品一区二区久久恐怖片| 26uuu成人网一区二区三区| 成人手机电影网| 青青草伊人久久| 国产精品国产精品国产专区不蜜| 在线免费视频一区二区| 国产精一区二区三区| 亚洲一二三区视频在线观看| 精品国产免费久久| 97se亚洲国产综合自在线不卡| 视频一区二区欧美| 国产精品久久久久aaaa| 日韩欧美一区在线| 在线看国产一区二区| 国产在线精品一区二区| 肉丝袜脚交视频一区二区| 国产精品无圣光一区二区| 欧美三级日本三级少妇99| 国产福利视频一区二区三区| 亚洲国产精品自拍| 亚洲卡通动漫在线| 26uuu国产一区二区三区| 欧美亚一区二区| 成人av小说网| 国内精品免费**视频| 亚洲不卡一区二区三区| 欧美国产乱子伦 | 国产成人午夜电影网| 亚洲第一福利一区| 亚洲综合视频在线观看| 国产精品国产精品国产专区不片| 精品少妇一区二区三区视频免付费 | 国产精品2024| 久久国产欧美日韩精品| 亚洲成av人片一区二区梦乃| 成人欧美一区二区三区1314| |精品福利一区二区三区| 国产网站一区二区三区| 精品久久久久99| 欧美一区二区三区系列电影| 国产成人av资源| 精品视频色一区| 99国内精品久久| 色综合久久99| 欧美丝袜第三区| 91国产成人在线| 欧美综合色免费| 欧美日韩一级黄| 欧美一区二区福利视频| 精品成人a区在线观看| 国产亚洲欧美色| 中文字幕一区二区三中文字幕| 亚洲欧洲成人自拍| 亚洲自拍偷拍九九九| 日本va欧美va精品| 国产精品2024| 色猫猫国产区一区二在线视频| 欧美日韩电影在线| 精品国产乱码久久久久久蜜臀 | 精品久久免费看| 国产日韩欧美激情| 一二三区精品福利视频| 美女高潮久久久| 丰满白嫩尤物一区二区| 在线免费观看日本欧美| 欧美不卡视频一区| 亚洲乱码中文字幕| 久88久久88久久久| 色综合久久久久| 欧美一区二区三区免费观看视频| 欧美变态tickling挠脚心| 成人免费视频在线观看| 日本成人在线不卡视频| 东方欧美亚洲色图在线| 欧美日本一区二区| 国产精品国产三级国产a| 午夜免费久久看| 国产一区二区导航在线播放| 日本乱人伦一区| 久久久久免费观看| 亚洲国产精品影院| 床上的激情91.| 91精品综合久久久久久| 国产精品第五页| 久久国产日韩欧美精品| 日本丶国产丶欧美色综合| 一区二区三区四区不卡在线| 国产裸体歌舞团一区二区| 在线观看91视频| 久久久久久久久一| 视频一区视频二区中文字幕| 大胆欧美人体老妇| 欧美不卡一区二区三区| 亚洲国产视频一区二区| 成人毛片老司机大片| 欧美一级理论片| 亚洲妇熟xx妇色黄| 99久久亚洲一区二区三区青草| 26uuu精品一区二区在线观看| 亚洲午夜久久久| 色天天综合色天天久久| 国产精品天干天干在线综合| 久草热8精品视频在线观看| 欧美美女直播网站| 亚洲免费观看高清完整版在线观看| 国产一区日韩二区欧美三区| 欧美人体做爰大胆视频| 亚洲一区二区三区四区的| 91美女视频网站| 国产精品久久看| 成人激情小说乱人伦| 国产日本欧洲亚洲| 国产成人精品午夜视频免费| 欧美一区日本一区韩国一区| 亚洲一区中文在线| 色狠狠色噜噜噜综合网| 亚洲蜜臀av乱码久久精品蜜桃| 国产高清不卡一区| 国产人久久人人人人爽| 国产一区二区伦理| 久久久不卡网国产精品二区| 精品亚洲成av人在线观看| 精品国产免费视频| 国产精品一区在线观看你懂的| 欧美电影免费观看高清完整版在线观看 | 高清国产一区二区三区| 久久精品网站免费观看| 国产精品一区二区久久精品爱涩 | 欧洲亚洲精品在线| 亚洲国产成人porn| 欧美三级电影在线看| 午夜精品福利一区二区蜜股av| 欧美日韩在线三级| 日韩电影在线免费看| 欧美xxxxx裸体时装秀| 精品一区二区三区在线播放视频| 精品毛片乱码1区2区3区| 国产精品1024久久| 中文字幕在线播放不卡一区| 91免费版在线看| 亚洲www啪成人一区二区麻豆| 69精品人人人人| 激情图区综合网| 国产精品久久久久一区| 91久久精品一区二区三| 视频一区视频二区中文| 精品盗摄一区二区三区| 成人精品一区二区三区中文字幕| 日韩一区中文字幕| 91麻豆精品国产自产在线| 精品一区二区三区不卡 | 色偷偷成人一区二区三区91 | 日韩国产在线观看一区| 26uuu另类欧美亚洲曰本|