rank.m
来自「国外专家做的求解LMI鲁棒控制的工具箱,可以相对高效的解决LMI问题」· M 代码 · 共 37 行
M
37 行
function varargout=rank(varargin)
%RANK (overloaded)
% Author Johan L鰂berg
% $Id: rank.m,v 1.5 2005/07/18 15:01:30 joloef 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 generates 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)
% SHOULD NEVER HAPPEN, THIS SHOULD BE CAUGHT BY BUILT-IN
error('Overloaded SDPVAR/RANK CALLED WITH DOUBLE. Report error')
case 'sdpvar' % Overloaded operator for SDPVAR objects. Pass on args and save them.
varargout{1} = yalmip('addextendedvariable',mfilename,varargin{1});
case 'char' % YALMIP send 'model' when it wants the epigraph or hypograph
if isequal(varargin{1},'graph')
varargout{1} = set([]);
varargout{2} = 0; % Neither convex or concave
else
error('SDPVAR/RANK called with CHAR argument?');
end
otherwise
error('Strange type on first argument in SDPVAR/RANK');
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?