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

📄 invpos.m

📁 matlab波形优化算法经常要用到的matlab toolbox工具箱:yalmip
💻 M
字号:
function varargout = sumabsk(varargin)
% INVPOS  Returns model of 1./x

% Author Johan L鰂berg
% $Id: invpos.m,v 1.1 2007/12/17 12:16:41 joloef Exp $

switch class(varargin{1})

    case 'double' % What is the numerical value of this argument (needed for displays etc)
        varargout{1} = 1./varargin{1};

    case 'sdpvar' % Overloaded operator for SDPVAR objects. Pass on args and save them.
        varargout{1} = InstantiateElementWise(mfilename,varargin{:});
        
    case 'char' % YALMIP sends '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} = set(cone([2;X-t],X+t));
            varargout{2} = struct('convexity','convex','monotonicity','none','definiteness','positive','model','graph');
            varargout{3} = X;
        else
        end
    otherwise
end

⌨️ 快捷键说明

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