Improved version of sub2ind. Almost the same as sub2ind, except always returns only a single output that contains all the subscript locations. Also handles multiple linear subscripts at the same time more conviniently then matlab's version. See help for sub2ind for more info. INPUTS siz - size of array into which sub is an index sub - sub(i,:) is the ith set of subscripts into the array. OUTPUTS ind - linear index (or vector of indicies) into given array EXAMPLE ind = sub2ind2( [10,10], [10 2] ); ind = sub2ind2( [10,10], [9 2; 10 2] ); DATESTAMP 29-Sep-2005 2:00pm See also SUB2IND, IND2SUB2