dual.m

来自「国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题」· M 代码 · 共 29 行

M
29
字号
function sys = dual(X)
%DUAL Extract dual variable
%   
%   Z = DUAL(F)     Returns the dual variable for the constraint F
% 
%   See also   SET, SOLVESDP
  
% Author Johan L鰂berg
% $Id: dual.m,v 1.3 2005/02/04 10:10:26 johanl Exp $

nlmi = size(X.clauses,2);

% Is it an empty SET
if (nlmi == 0) 
    sys = [];
    return
end

if nlmi>1
    error('Dual not applicable on list of constraints. Use dual(F(index)) or dual(F(''tag''))')
end

% Get dual from repospitory
sys = yalmip('dual',X.LMIid);

% If no dual available, returns NaNs with correct dimension
if isempty(sys)
    sys = real(double(X))+NaN;
end

⌨️ 快捷键说明

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