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

📄 detinv.m

📁 国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题
💻 M
字号:
function varargout = detinv(varargin)
%DETINV Nonlinear operator in YALMIP
%
% t = detinv(X) returns det(X)^(1/(2^ceil(log2(length(X)))))
%
% This concave function is monotonically growing in det(P) so
% it can be used for maximizing det(P), or to add lower 
% bound constraints on the determinant.
%
% See also SDPVAR

% Author Johan L鰂berg
% $Id: detinv.m,v 1.4 2004/12/21 13:22:29 johanl Exp $

% ***************************************************
% This file defines a nonlinear operator for YALMIP
%
% It can take three different inputs
% For double inputs, it returns standard double values
% For sdpvar inputs, it genreates a an internal variable
% When first input is 'model' it generates the epigraph
%
% ***************************************************
switch class(varargin{1})
    
    case 'double' % What is the numerical value of this argument (needed for displays etc)        
        X = varargin{1};
        varargout{1} = det(X)^(1/(2^ceil(log2(length(X)))));
                
    case 'sdpvar' % Overloaded operator for SDPVAR objects. Pass on args and save them.
        if is(varargin{1},'symmetric')
            varargout{1} = yalmip('addextendedvariable',mfilename,varargin{:});    
        else
            error('detinv can only be applied to symmetric variables');
        end
        
    case 'char' % YALMIP send 'model' when it wants the epigraph or hypograph
        if isequal(varargin{1},'graph')
            t = varargin{2}; % Second arg is the extended operator variable
            X = varargin{3}; % Third arg and above are the args user used when defining t.           
            varargout{1} = detset(t,X);
            varargout{2} = -1; % Concave operator            
        else           
        end    
    otherwise
end

⌨️ 快捷键说明

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