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

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

Added original make3d

File size: 515 bytes
Line 
1function index = end(X,position,numindices)
2%END (overloaded)
3
4% Author Johan Löfberg
5% $Id: end.m,v 1.4 2006/07/26 20:17:57 joloef Exp $
6
7switch numindices
8    case 1
9        % User has written someting like X(end)
10        sizes = X.dim;%[X.n X.m];
11        if min(sizes)>1
12            index = prod(sizes);
13        else
14            index = max(sizes);
15        end
16    case 2
17        sizes = X.dim;%[X.n X.m];
18        index = sizes(position);
19    otherwise
20        error('Indexation dimension cannot exceed 2');
21end
Note: See TracBrowser for help on using the repository browser.