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

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

?? createdata.m

?? 統(tǒng)計模式識別工具箱(Statistical Pattern Recognition Toolbox)包含: 1
?? M
?? 第 1 頁 / 共 2 頁
字號:
function result = createdata(action,varargin)
% CREATEDATA Interactive data generator.
%
% Synopsis:
%  createdata
%  createdata('finite')
%  createdata('finite',num_classes)
%  createdata('gauss')
%  createdata('gauss',num_distrib)
%
% Description:
%  createdata or createdata('finite') invokes an interactive generator 
%  of finite point sets in 2D. The generated points can be assigned 
%  into two classes (1,2). The generator saves data to a 
%  specified file. The file has the following fields:
%   X [2 x num_data] 2D vectors.
%   y [1 x num_data] Assigned labels.
%
%  createdata('finite',num_classes) when num_classes is specified
%   then the points can be assigned labels from 1 to num_classes.
%  
%  createdata('gauss') invokes an interactive generator of 
%   Gaussian distributions. A user can specify mean vector and
%   covariance matrix. The generator saves data to a file
%   having the following fields:
%    Mean [2 x ncomp] Mean vectors.
%    Cov [2 x 2 x ncomp] Covariance matrices.
%    y [1 x ncomp] Assigned labels.
%
%  createdata('gauss',num_classes) when num_classes is specified
%   then the distributions can be assigned labels from 1 to num_classes.
%  
%  The data generator is controlled by mouse:
%    Left button  ... creates a new point or Gaussian.
%    Right button ... erases the focused point or Gaussian.
%
%  In the case of generating Gaussians left button double-click makes
%  selected Gaussian focused. The covariance matrix of focused 
%  Gaussian can be modified.
%

% About: Statistical Pattern Recognition Toolbox
% (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac 
% <a href="http://www.cvut.cz">Czech Technical University Prague</a>
% <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a>
% <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a>
                                                                                
% Modifications:   
% 01-may-2004, VF
% 13-Feb-2003, VF  


XCOLORS=['r','b','g','m','c','k','y'];      % colors of the ellipses
MAXCOLOR=size(XCOLORS,2);
ID_NORMAL='Infinite sets, Normal distributions';
ID_FINITE='Finite sets, Enumeration';
DX_SPACE=0.5;   % space betwean the nearest point and the left and right border
DY_SPACE=0.5;   % --//--                                  top and bottom -//-

if nargin < 1,
   action = 'finite';
end

switch lower(action)
case 'finite'
   % == We will create finite data sets ===================================
   if nargin < 2,
      K=2;
   else
      K=varargin{1};
   end
   createdata('initialize',action,K,varargin{2:nargin-1});

case 'gauss'
   % == We will create gaussian distributed sets  ===========================
   if nargin < 2,
      K=2;
   else
      K=varargin{1};
   end
   createdata('initialize',action,K,varargin{2:nargin-1});


case 'initialize'
   % == Initialize dialog window =========================================

   % get input arguments
   K=varargin{2};

   % == Figure ===========================================================
   hfigure = figure(...
      'Visible','off',...
    'NumberTitle','off', ...
       'Units','normalized', ...
      'RendererMode','manual');

   % == Axes =============================================================
   haxes1= axes(...
       'Units','normalized', ...
      'ButtonDownFcn','createdata(''click'',gcf)',...
      'Box','on', ...
      'XGrid','on', ...
      'YGrid','on', ...
      'NextPlot','add',...
      'Position',[0.1 0.1 0.65 0.85]);
   axis([-1 1 -1 1]);
   xlabel('X');
   ylabel('Y');


   % == Buttons ==========================================================
   left=0.8;
   bottom=0.05;
   height=0.05;
   width=0.15;

   % close button
   hbtclose = uicontrol( ...
      'Units','Normalized', ...
      'Callback','createdata(''close'',gcf)',...
        'ListboxTop',0, ...
        'Position',[left bottom width height], ...
        'String','Close');

   % ok button
   bottom=bottom+1*height;
   hbtok = uicontrol( ...
      'Units','Normalized', ...
      'Callback','createdata(''ok'',gcf)',...
        'ListboxTop',0, ...
      'UserData',varargin,...
      'Position',[left bottom width height], ...
        'String','OK');

   % info button
   bottom=bottom+1.5*height;
   hbtinfo = uicontrol( ...
      'Units','Normalized', ...
      'Callback','createdata(''info'',gcf)',...
        'ListboxTop',0, ...
        'Position',[left bottom width height], ...
        'String','Info');

   % load button
   bottom=bottom+1.5*height;
   hbtload = uicontrol( ...
      'Units','Normalized', ...
      'Callback','createdata(''load'',gcf)',...
        'ListboxTop',0, ...
        'Position',[left bottom width height], ...
        'String','Load');

   % save button
   file=struct('name','noname.mat','path','','pathname','noname.mat');
   bottom=bottom+1*height;
   hbtsave = uicontrol( ...
      'Units','Normalized', ...
      'Callback','createdata(''save'',gcf)',...
        'ListboxTop',0, ...
      'Position',[left bottom width height], ...
      'UserData',file,...
        'String','Save');

   % == Popup menus ===================================================

   % popup menu - class
   % title
   bottom=0.91;
   htxclass =uicontrol( ...
      'Style','text', ...
      'Units','normalized', ...
      'Position',[left bottom width 0.9*height], ...
      'String','Class');

   % popup menu
   for i=1:K,
      txnum=sprintf(' %d ',i);
      classes(i,1:size(txnum,2))=txnum;
   end

   bottom=bottom-height;
   hpuclass=uicontrol( ...
      'Style','popup', ...
      'Units','normalized', ...
      'Position',[left bottom width height], ...
      'String',classes);

   % == Edit lines =======================================================

   % x-axis
   bottom=bottom-1.2*height;
   htxxaxis=uicontrol( ...
      'Style','text', ...
      'Units','normalized', ...
      'Position',[left bottom width 0.9*height], ...
      'String','X-Axis');
   bottom=bottom-height;
   hedxaxis = uicontrol(...
    'Units','normalized', ...
      'ListboxTop',0, ...
        'Position',[left bottom width height], ...
      'CallBack','createdata(''setaxis'',gcf)',...
      'Style','edit',...
      'String','[-1 1]');

   % y-axis
   bottom=bottom-1.2*height;
   htxyaxis=uicontrol( ...
      'Style','text', ...
      'Units','normalized', ...
      'Position',[left bottom width 0.9*height], ...
      'String','Y-Axis');
   bottom=bottom-height;
   hedyaxis = uicontrol(...
    'Units','normalized', ...
      'ListboxTop',0, ...
      'Position',[left bottom width height], ...
      'CallBack','createdata(''setaxis'',gcf)',...
      'Style','edit',...
      'String','[-1 1]');

   % normal distributions are given by SIGMA in addition
   if strcmpi(varargin{1},'gauss'),

      % label
      bottom=bottom-1.5*height;
      htxcov=uicontrol( ...
         'Style','text', ...
         'Units','normalized', ...
         'Position',[left bottom width 0.9*height], ...
         'String','Covariance');

      % cov(xy)
      bottom=bottom-height;
      hedxx = uicontrol(...
        'Units','normalized', ...
         'ListboxTop',0, ...
         'Position',[left bottom width*0.5 height], ...
         'CallBack','createdata(''setcov'',gcf,1)',...
         'Style','edit',...
         'String','1');
      % cov(xy)
      hedxy = uicontrol(...
        'Units','normalized', ...
         'ListboxTop',0, ...
         'Position',[left+width*0.5 bottom width*0.5 height], ...
         'CallBack','createdata(''setcov'',gcf,2)',...
         'Style','edit',...
         'String','0');
      % cov(yx)
      bottom=bottom-height;
      hedyx = uicontrol(...
        'Units','normalized', ...
         'ListboxTop',0, ...
         'Position',[left bottom width*0.5 height], ...
         'CallBack','createdata(''setcov'',gcf,3)',...
         'Style','edit',...
         'String','0');
      % cov(yy)
      hedyy = uicontrol(...
        'Units','normalized', ...
         'ListboxTop',0, ...
         'Position',[left+width*0.5 bottom width*0.5 height], ...
         'CallBack','createdata(''setcov'',gcf,4)',...
         'Style','edit',...
         'String','1');

      bottom=bottom-1.2*height;
      htxmi1=uicontrol( ...
         'Style','text', ...
         'Units','normalized', ...
         'Position',[left bottom width 0.9*height], ...
         'String','MI=[');
      bottom=bottom-0.9*height;
      htxmi2=uicontrol( ...
         'Style','text', ...
         'Units','normalized', ...
         'Position',[left bottom width 0.9*height], ...
         'String','    ]');
   end

   % == Axes title ========================================================
   pos=get(haxes1,'Position');
   titletext=sprintf('File: %s',file.name);
   fontsize=(1-pos(2)-pos(4))*0.8;
   htitle=title(titletext,...
      'VerticalAlignment','bottom',...
      'HorizontalAlignment','left',...
      'FontUnits','normalized',...
      'Units','normalized',...
      'Position',[0 1 0],...
      'FontSize',fontsize);


   % =========================================================================

   % create the structures according to the current set type
   switch lower(varargin{1}),
   case 'finite'
      set(hfigure,'name','Generator of finite point sets');
      ident=ID_FINITE;
      % set handlers
      handlers=struct(...
         'settype',lower(varargin{1}),...
         'saved',1,...
         'btsave',hbtsave,...
         'edxaxis',hedxaxis,...
         'edyaxis',hedyaxis,...
         'title',htitle,...
         'btok',hbtok,...
         'axes1',haxes1,...
         'puclass',hpuclass );
   case 'gauss'
      set(hfigure,'name','Generator of Gaussian distributions');
      ident=ID_NORMAL;
      % set handlers
      handlers=struct(...
         'settype',lower(varargin{1}),...
         'currpoint',0,...
         'currhandle',0,...
         'saved',1,...
         'title',htitle,...
         'btsave',hbtsave,...
         'edxaxis',hedxaxis,...
         'edyaxis',hedyaxis,...
         'txmi1',htxmi1,...
         'txmi2',htxmi2,...
         'edxx',hedxx,...
         'edxy',hedxy,...
         'edyx',hedyx,...
         'edyy',hedyy,...
         'btok',hbtok,...
         'axes1',haxes1,...
         'puclass',hpuclass );
   end

   sets=struct(...
      'K',zeros(1,K),...
      'X',[],...
      'I',[],...
      'MI',[],...
      'SIGMA',[],...
      'N',2,...
      'id',ident);

   % store handlers and data set structure
   set(hfigure,'UserData',handlers);
   set(haxes1,'UserData',sets);


   % set figure as visible
   set(hfigure,'Visible','on');


case 'setcov'
   % == Set covariance matrix of current selected point ===================

   % get handlers
   hfigure=varargin{1};
   h=get(hfigure,'UserData');

   %get data set
   sets=get(h.axes1,'UserData');

   % current point
   i=h.currpoint;

   if varargin{2}==2,
      set(h.edyx,'String',get(h.edxy,'String'));
   elseif varargin{2}==3,
      set(h.edxy,'String',get(h.edyx,'String'));
   end

   % if some point is selected
   if i ~= 0,
      % get cov. matrix from edit lines
      sigma(1,1)=str2num(get(h.edxx,'String'));
      sigma(1,2)=str2num(get(h.edxy,'String'));
      sigma(2,1)=str2num(get(h.edyx,'String'));
      sigma(2,2)=str2num(get(h.edyy,'String'));

      % is sigma positive definite ?
      [aa,p]=chol(sigma);
      if p ~= 0,
         set(h.edxx,'String','1');
         set(h.edxy,'String','0');
         set(h.edyx,'String','0');
         set(h.edyy,'String','1');
         sigma=eye(2,2);
      end

      sets.SIGMA(:,(i-1)*2+1:i*2)=sigma;
      set(h.axes1,'UserData',sets);

%%%      window=axis;
      window=getaxis(h.axes1);
      R=min([(window(2)-window(1)),(window(4)-window(3))])/20;
      i=h.currpoint;
      class=sets.I(i);
%%      isigma=inv(sigma);
      mi=sets.MI(:,i);
%%%      [x,y]=ellipse(isigma,20,R,mi);
      [x,y]=ellips(mi,inv(sigma),R);

      if h.currhandle==0,
         % draw new ellipse
         h.currhandle =fill(x,y,XCOLORS(mod(class-1,MAXCOLOR)+1),...
            'EraseMode','none',...
            'ButtonDownFcn','createdata(''click'',gcf)',...
            'Tag','ellipse',...
            'UserData',mi);
         set(hfigure,'UserData',h);
      else
         set(h.currhandle,'XData',x,'YData',y,'EraseMode','normal');
      end
   end % if i ~= 0,

case 'redraw'
   % == Redraw axes ===========================================================
   hfigure=varargin{1};
   h = get(hfigure,'UserData');      % get handlers

   children=get(h.axes1,'Children' );
   set(children,'EraseMode','normal','Visible','off');

   % get sets
   sets=get(h.axes1,'UserData');

   % set axes
   if strcmpi(sets.id,ID_FINITE)==1,
      maxs=max(sets.X');
      mins=min(sets.X');
   elseif strcmpi(sets.id,ID_NORMAL )==1,
      % set axes
      maxs=max(sets.MI');
      mins=min(sets.MI');
   end
   dx=min( (maxs(1)-mins(1)), 1 )*DX_SPACE;
   dy=min( (maxs(2)-mins(2)), 1 )*DY_SPACE;
   x1=round(mins(1)-dx);
   x2=round(maxs(1)+dx);
   y1=round(mins(2)-dy);
   y2=round(maxs(2)+dx);
   win=[x1 x2 y1 y2];
   axes(h.axes1);
   %%%   axis(win);
   setaxis(h.axes1,win);

   % redraw points or ellipses
   if strcmpi(sets.id,ID_FINITE)==1,
      % points
      for i=1:sum(sets.K),
         line(sets.X(1,i),sets.X(2,i), ...
            'LineStyle','none', ...
            'Marker','.', ...
            'Color',XCOLORS(mod(sets.I(i)-1,MAXCOLOR)+1), ...
            'MarkerSize',25, ...
            'ButtonDownFcn','createdata(''click'',gcf)',...
            'EraseMode','none',...
            'Tag','point');
      end

   elseif strcmpi(sets.id,ID_NORMAL )==1,
      R=min([(win(2)-win(1)),(win(4)-win(3))])/20;
      % ellipses
      for i=1:sum(sets.K),
         sigma=sets.SIGMA(:,(i-1)*2+1:i*2);
         mi=sets.MI(:,i);
%%         [x,y]=ellipse(isigma,20,R,mi);
         [x,y]=ellips(mi,inv(sigma),R);
         class=sets.I(i);

         fill(x,y,XCOLORS(mod(class-1,MAXCOLOR)+1),...
            'EraseMode','none',...
            'ButtonDownFcn','createdata(''click'',gcf)',...
            'Tag','ellipse',...
            'UserData',mi);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费小视频| 91精品国产综合久久精品性色| 一本一道波多野结衣一区二区 | 久久精品免费在线观看| 97久久超碰精品国产| 奇米在线7777在线精品| 午夜欧美在线一二页| 在线播放欧美女士性生活| 久久99久久精品| 欧美精品一区二区在线观看| 狠狠狠色丁香婷婷综合久久五月| 男人的j进女人的j一区| 欧美三级资源在线| 狠狠色狠狠色综合系列| 国产欧美一区二区精品性| 色偷偷88欧美精品久久久| 久久精品视频在线看| 欧美精品一区男女天堂| 欧美亚洲丝袜传媒另类| 欧美日韩免费不卡视频一区二区三区| 91片黄在线观看| 欧美无砖砖区免费| 制服丝袜中文字幕亚洲| 91成人免费在线| 欧美成人猛片aaaaaaa| 91精品国产麻豆国产自产在线 | 91视频www| 99精品国产91久久久久久| 亚洲色图在线播放| 久久久91精品国产一区二区精品 | 日韩欧美精品三级| 日韩avvvv在线播放| 国产精品毛片无遮挡高清| 国产精品视频观看| 一区二区三区四区视频精品免费 | 在线综合视频播放| 欧美综合一区二区三区| 激情图区综合网| 91浏览器入口在线观看| 99精品视频一区二区| 久久亚洲一区二区三区明星换脸 | 97久久超碰国产精品| 精彩视频一区二区| 欧亚一区二区三区| 国产91精品入口| 亚洲日本在线a| 亚洲第一在线综合网站| 日韩激情在线观看| 国产九九视频一区二区三区| 国产精品1区2区3区在线观看| 成人免费在线观看入口| 在线免费观看日本欧美| 欧美在线观看一二区| 日韩女优制服丝袜电影| 国产欧美日韩在线观看| 国产精品黄色在线观看| 亚洲日穴在线视频| 青青草原综合久久大伊人精品 | 91精品一区二区三区在线观看| 日韩一级视频免费观看在线| 亚洲国产精品精华液2区45| 亚洲国产欧美日韩另类综合 | 久久精品夜色噜噜亚洲aⅴ| 精品国内二区三区| 一二三四社区欧美黄| 国产精品88av| 欧美日产在线观看| 国产区在线观看成人精品| 一区二区三区中文字幕电影 | 欧美另类久久久品| 日韩影院精彩在线| www.欧美.com| 久久久av毛片精品| 一区二区三区在线高清| 91九色02白丝porn| 国产精品国产三级国产普通话蜜臀 | 国产激情精品久久久第一区二区| 国产a精品视频| 国产精品成人一区二区三区夜夜夜| 日本韩国精品一区二区在线观看| 91一区一区三区| 26uuu国产在线精品一区二区| 亚洲一二三四在线| 99re这里只有精品首页| 久久久亚洲欧洲日产国码αv| 日韩国产欧美三级| 欧美三级中文字| 夜夜嗨av一区二区三区四季av| 亚洲精品福利视频网站| 国产91清纯白嫩初高中在线观看| 51午夜精品国产| 麻豆免费精品视频| 久久老女人爱爱| 成人精品免费网站| 日韩免费看网站| 成年人国产精品| 3d动漫精品啪啪1区2区免费| 欧美一区二区三区系列电影| 亚洲福利视频导航| 91国内精品野花午夜精品| 国产精品久久久久一区| 丰满亚洲少妇av| 国产亚洲综合色| 国产精品一区二区x88av| 欧美精品一区二区三区蜜臀| 久久国产精品99久久人人澡| 国产三级精品三级在线专区| 国产精品婷婷午夜在线观看| 精品福利一区二区三区免费视频| 日本亚洲最大的色成网站www| 欧美日韩aaa| 青青草国产成人av片免费| 91精品国产免费| 久久精品国产99| 亚洲精品一线二线三线无人区| 精品一区二区三区香蕉蜜桃| 久久嫩草精品久久久久| 成人晚上爱看视频| 日韩一区有码在线| 一本到不卡免费一区二区| 一区二区三区四区亚洲| 欧美日韩一区二区三区四区五区| 午夜精品久久久久久久99水蜜桃 | 日韩经典中文字幕一区| 日韩欧美国产午夜精品| 国产麻豆91精品| 中文字幕精品一区二区精品绿巨人 | 国产呦精品一区二区三区网站| 国产夜色精品一区二区av| 成人av一区二区三区| 亚洲欧美国产三级| 欧美群妇大交群中文字幕| 日韩精品电影在线| 狠狠色狠狠色综合日日91app| 在线一区二区视频| 日本一区二区久久| 在线一区二区视频| 制服丝袜国产精品| 黄一区二区三区| 国产精品久久久久久久久图文区| 91色porny在线视频| 亚洲成a人片综合在线| 日韩久久免费av| www.视频一区| 天堂av在线一区| 欧美激情在线观看视频免费| 91视视频在线观看入口直接观看www | 成人性生交大片免费看中文网站| 亚洲欧美激情一区二区| 中文字幕日韩欧美一区二区三区| 91在线你懂得| 麻豆精品视频在线观看| 国产精品久久久久久久岛一牛影视| 欧美日韩久久久| 国产不卡一区视频| 一级特黄大欧美久久久| 欧美成人精品二区三区99精品| 96av麻豆蜜桃一区二区| 日本成人在线电影网| 中文字幕一区不卡| 日韩一级片在线观看| 91美女福利视频| 国产在线观看一区二区| 伊人性伊人情综合网| 26uuu精品一区二区| 欧美日韩精品一区二区| 成人免费看片app下载| 日韩在线一二三区| 欧美丝袜丝交足nylons图片| 国产精品影视天天线| 亚洲大片在线观看| 亚洲第一综合色| 亚洲第一会所有码转帖| 久久久www成人免费毛片麻豆| 欧美精品日韩精品| 97国产一区二区| 国产一区二区三区日韩| 日韩精品亚洲一区| 亚洲成在人线免费| 中文字幕一区二区三区不卡 | 精品国产乱码久久久久久老虎| 日本久久一区二区| 国产**成人网毛片九色| 久久精品国产秦先生| 亚洲成人动漫精品| 亚洲图片激情小说| 国产精品欧美极品| 2020国产精品| 欧美大度的电影原声| 777欧美精品| 一本到不卡免费一区二区| 成人黄色综合网站| 国产**成人网毛片九色| 国产精品一品二品| 久久99久久精品欧美| 久久久国产午夜精品| 欧美xfplay| 日韩一区二区三区在线| 欧美精品久久99| 欧美日韩不卡一区|