source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/@sdpvar/floor.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.2 KB
Line 
1function varargout=ceil(varargin)
2%FLOOR (overloaded)
3
4% Author Johan Löfberg
5% $Id: floor.m,v 1.2 2006/07/26 20:17:58 joloef Exp $
6
7switch class(varargin{1})
8
9    case 'sdpvar' % Overloaded operator for SDPVAR objects. Pass on args and save them.
10
11        x = varargin{1};
12        [n,m] = size(x);
13        x = reshape(x,n*m,1);
14        y = [];
15        for i = 1:n*m
16            y = [y;yalmip('addextendedvariable',mfilename,extsubsref(x,i))];
17        end
18        y = reshape(y,n,m);
19        varargout{1} = y;
20       
21    case 'char' % YALMIP send 'graph' when it wants the epigraph or hypograph
22        switch varargin{1}
23            case {'milp','graph'}
24                % Description using epigraphs
25                t = varargin{2};
26                X = varargin{3};
27               
28                c = intvar(1,1);
29                F = set(x-1 <= c <= x);
30
31                varargout{1} = F;
32                varargout{2} = struct('convexity','milp','monotonicity','milp','definiteness','milp');
33                varargout{3} = X;
34               
35            otherwise
36                error('SDPVAR/SORT called with CHAR argument?');
37        end
38    otherwise
39        error('Strange type on first argument in SDPVAR/SORT');
40end
Note: See TracBrowser for help on using the repository browser.