📄 movealgorithm.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 + -