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

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

Added original make3d

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