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

📄 remove_repeat_hyp.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function [newC, newd] = remove_repeat_hyp(con, C, d)news = true(size(d));for i=1:length(news)    news(i) = is_new_ineq(con, C(i,:), d(i,:));endnewC = C(news, :);newd = d(news, :);endfunction new = is_new_ineq(CONfeas,c,d)% Check if the given constraint cTx <= d% is already in the feasible constraint CONfeasglobal GLOBAL_APPROX_PARAMhyperplane_tol = GLOBAL_APPROX_PARAM.poly_hyperplane_tol;% First search the equality constraintsCE = CONfeas.CE; dE = CONfeas.dE;new = 1;for k = 1:length(dE)    MATRIX = [CE(k,:) dE(k); c d];    if (rank(MATRIX,hyperplane_tol) < 2)        new = 0;        break;    endendif new    % Now search the inequality constraints    CI = CONfeas.CI; dI = CONfeas.dI;    for k = 1:length(dI)        MATRIX = [CI(k,:) dI(k); c d];        if (rank(MATRIX,hyperplane_tol) < 2) & (CI(k,:)*c' > 0)            new = 0;            break;        end    endendend

⌨️ 快捷键说明

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