VINDEX is the jVarfun module of jLab.

 VINDEX  Indexes an N-D array along a specified dimension.
 
    Y=VINDEX(X,INDEX,DIM) indexes the multidimensional array X along     
    dimension DIM. This is equivalent to   
 		
 		    1 2       DIM     DIMS(X)
 		    | |        |         |
 		Y=X(:,:, ... INDEX, ..., :);		
 
    where the location of INDEX is specified by DIM.
 
    VINDEX is defined to return an empty array if INDEX is empty.
   
    Note that VINDEX does not index along singleton dimensions, thus
    when X is a column vector, VINDEX(X,INDEX,2) returns X.  
 
    [Y1,Y2,...YN]=VINDEX(X1,X2,...XN,INDEX,DIM) also works.
 
    VINDEX(X1,X2,...XN,INDEX,DIM); with no output arguments overwrites 
    the original input variables.
 
    VINDEX also supports logical indexing with INDEX a boolean array
    of the same size as the dimension being indexed.
 
    See also VINDEXINTO, SQUEEZE, DIMS, PERMUTE, SHIFTDIM.
 
    'vindex --t' runs a test.
 
    Usage:  y=vindex(x,index,dim);
            [y1,y2,y3]=vindex(x1,x2,x3,index,dim);
            vindex(x1,x2,x3,index,dim);
    __________________________________________________________________
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2001--2014 J.M. Lilly --- type 'help jlab_license' for details    

contents | allhelp | index