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

📄 isfeasible.m

📁 国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题
💻 M
字号:
function [feasible,feaslistLMI] = isfeasible(F,tol)

% Author Johan L鰂berg 
% $Id: isfeasible.m,v 1.3 2005/02/04 10:10:26 johanl Exp $   

% Check if solution avaliable
currsol = evalin('caller','sdpvar(''getSolution'')');
if isempty(currsol)
    feasible = 0;
end

nlmi = size(F.clauses,2);
if (nlmi == 0)
    feasible = 1;
    feaslistLMI = [];
    return
end

feaslistLMI = zeros(nlmi,1);
if nlmi>0
    for j = 1:nlmi
        F0 = double(F.clauses{j}.data);
        if any(isnan(F0(:)))
            res = NaN;
        else
            switch F.clauses{j}.type
                case 1
                    res = min(eig(F0));
                case 2
                    res = min(min(F0));
                case 3
                    res = -max(max(abs(F0)));
                case 4
                    res = F0(1)-norm(F0(2:end));
                case 5
                    res = 2*F0(1)*F0(2)-norm(F0(3:end))^2
            end
        end
        feaslistLMI(j) = res;
    end
end

if nargin==1
    if (isempty(feaslistLMI) | min(feaslistLMI)>=0)
        feasible = 1;
    else
        feasible = 0;
    end
end

⌨️ 快捷键说明

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