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

📄 clean_transition.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function clean_loc=clean_transition(location) counter=1;    for i=1:length(location.transitions)       if location.transitions{i}.id>0         cur_guard=location.transitions{i}.guard;            for j=i+1:length(location.transitions)                 if ~isempty(cur_guard)&~isempty(location.transitions{j}.guard)                         %(isempty(cur_guard)&isempty(location.transitions{j}.guard))                     if length(cur_guard)==length(location.transitions{j}.guard)                        if (all(cur_guard==location.transitions{j}.guard))                        location.transitions{i}.source=[location.transitions{i}.source location.transitions{j}.source];                        location.transitions{i}.destination=[location.transitions{i}.destination location.transitions{j}.destination];                        location.transitions{i}.idx=[location.transitions{i}.idx location.transitions{j}.idx];                        % If either of the transitions resets, we should reset on the composite transion, too. Ansgar                        location.transitions{i}.reset_flag=max(location.transitions{i}.reset_flag, location.transitions{j}.reset_flag);                        location.transitions{i}.reset_scs_index=setdiff(                             [location.transitions{i}.reset_flag*location.transitions{i}.reset_scs_index, location.transitions{j}.reset_flag*location.transitions{j}.reset_scs_index],0);% moved                        location.transitions{j}.id=-1;                        end   %if                    end %if                end %if            end   %for j     clean_loc.transitions{counter}=location.transitions{i};     counter=counter+1;     end   %if location    end   %for i

⌨️ 快捷键说明

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