Line | |
---|
1 | function varargout=rank(varargin) |
---|
2 | %RANK (overloaded) |
---|
3 | |
---|
4 | % Author Johan Löfberg |
---|
5 | % $Id: rank.m,v 1.6 2006/05/14 11:54:15 joloef Exp $ |
---|
6 | |
---|
7 | % ************************************************************************* |
---|
8 | % This file defines a nonlinear operator for YALMIP |
---|
9 | % Rank is a bit non-standard, so don't look here to learn |
---|
10 | % % *********************************************************************** |
---|
11 | switch class(varargin{1}) |
---|
12 | |
---|
13 | case 'double' |
---|
14 | % SHOULD NEVER HAPPEN, THIS SHOULD BE CAUGHT BY BUILT-IN |
---|
15 | error('Overloaded SDPVAR/RANK CALLED WITH DOUBLE. Report error') |
---|
16 | |
---|
17 | case 'sdpvar' |
---|
18 | varargout{1} = yalmip('addextendedvariable',mfilename,varargin{1}); |
---|
19 | |
---|
20 | case 'char' |
---|
21 | varargout{1} = set([]); |
---|
22 | properties = struct('convexity','none','monotonicity','none','definiteness','none'); |
---|
23 | varargout{2} = properties; |
---|
24 | varargout{3} = varargin{3}; |
---|
25 | |
---|
26 | otherwise |
---|
27 | error('Strange type on first argument in SDPVAR/RANK'); |
---|
28 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.