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

📄 change_class.m

📁 最新的模式识别分类工具箱,希望对朋友们有用!
💻 M
字号:
function change_class(who_called)

%Change the display of a class, when one of the radio buttons is pressed.
%Used by the manual entry screen.

load synthetic

h0 = findobj('Tag', 'rbtClass0');       
h1 = findobj('Tag', 'rbtClass1');       
h  = findobj('Tag', 'txtCount');
hp = findobj('Tag', 'popNumber');                                                                     
n0 = size(s0,1);
n1 = size(s1,1);

if who_called,
   set(h0, 'Value', not(get(h1, 'Value')));
else
   set(h1, 'Value', not(get(h0, 'Value')));
end


%Set the number of Gaussians (if they exist)
if (get(h0, 'Value'))
   if (n0>0),
	   set(h, 'String', ['There are ' num2str(n0) ' Gaussians in this class'])
		s = cell(n0, 1);                                                                                    
		for i=1:n0,                                                                                         
   		s(i) =  cellstr(num2str(i));                                                                      
		end                                                                                                  
		set(hp, 'String', s')                                                                                 
		set(hp, 'Value', 1)                                                                                 
      set(hp, 'Max', n0);                                                                                  
   end
else
   if (n1>0),
	   set(h, 'String', ['There are ' num2str(n1) ' Gaussians in this class'])
		s = cell(n1, 1);                                                                                    
		for i=1:n1,                                                                                         
   		s(i) =  cellstr(num2str(i));                                                                      
		end                                                                                                  
		set(hp, 'String', s')                                                                                 
		set(hp, 'Value', 1)                                                                                 
      set(hp, 'Max', n1);                                                                                     
   end
end
   
change_gaussian

⌨️ 快捷键说明

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