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

📄 movealgorithm.m

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

%This function locates the algorithm chosen on the multialgorithm screen and
%moves it to the chosen algorithms screen.

if direction,
   hFrom = findobj('Tag','lstAllAlgorithms');
	hTo 	= findobj('Tag','lstChosenAlgorithms');
else
   hTo   = findobj('Tag','lstAllAlgorithms');
   hFrom	= findobj('Tag','lstChosenAlgorithms');
end


%Find the selected algorithm and remove it from the 'From list'
val		     = get(hFrom,'Value');     
algorithms    = get(hFrom,'String'); 

algorithm	  = algorithms(val,:);
if (isempty(deblank(algorithm)))
   break
end


newlist 		  = 1:size(algorithms,1);
newlist(val)  = 0;
newlist		  = newlist(find(newlist ~=0));

set(hFrom, 'Value', 1);
if ~isempty(newlist),
   set(hFrom, 'String', algorithms(newlist,:));
else
   set(hFrom, 'String', '          ');
end

%Put the new algorithm in the 'To list'
algorithms    = get(hTo,'String'); 
L				  = max(size(algorithms,2),size(algorithm,2));
if ((isempty(deblank(algorithms(1,:)))) & (size(algorithms,1) == 1))
   newalgorithms = algorithm;
else
	newalgorithms = zeros(size(algorithms,1)+1,L);
	newalgorithms(1:size(algorithms,1),:) = algorithms;
	newalgorithms(size(algorithms,1)+1,:) = algorithm;
end

set(hTo, 'String', char(newalgorithms))

⌨️ 快捷键说明

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