📄 compresslist.m
字号:
function sqrList = compressList(sqrList);
%COMPRESSLIST Internal function to track nonlinear expressions
% Author Johan L鰂berg
% $Id: compressList.m,v 1.2 2004/07/02 08:17:29 johanl Exp $
bottom = 1;
while bottom<=size(sqrList,1)
x1_list = find(ismember(sqrList(1:bottom,1),sqrList(bottom,2)));
x2_list = find(ismember(sqrList(1:bottom,1),sqrList(bottom,3)));
temp = [];
if isempty(x1_list)
temp = sqrList(bottom,2);
else
temp = sqrList(x1_list,2:end);
end
if isempty(x2_list)
temp = [temp sqrList(bottom,3)];
else
temp = [temp sqrList(x2_list,2:end)];
end
sqrList(bottom,2:2+length(temp)-1)=temp;
bottom = bottom+1;
end
sqrList = sqrList(:,1:max(find(any(sqrList,1))));
sqrList = [sqrList(:,1) fliplr(sort(sqrList(:,2:end),2))];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -