Home > rest_20090422 > rest_spm5_files > @create_file_array > end.m

end

PURPOSE ^

Overloaded end function for file_array objects.

SYNOPSIS ^

function en = end(a,k,n)

DESCRIPTION ^

 Overloaded end function for file_array objects.
 _______________________________________________________________________
 Copyright (C) 2005 Wellcome Department of Imaging Neuroscience

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

end.m

SOURCE CODE ^

0001 function en = end(a,k,n)
0002 % Overloaded end function for file_array objects.
0003 % _______________________________________________________________________
0004 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience
0005 
0006 %
0007 % $Id: end.m 253 2005-10-13 15:31:34Z guillaume $
0008 
0009 dim = size(a);
0010 if k>length(dim)
0011     en = 1;
0012 else
0013     if n<length(dim),
0014     dim = [dim(1:(n-1)) prod(dim(n:end))];
0015     end;
0016     en = dim(k);
0017 end;

Generated on Wed 29-Apr-2009 01:06:38 by m2html © 2005