VINDEXINTO is the jVarfun module of jLab.

 VINDEXINTO  Indexes into N-D array along a specified dimension.
 
    Y=VINDEXINTO(Y,X,INDEX,DIM) indexes the array X into the multi- 
    dimensional array Y along dimension DIM. This is equivalent to   
 		
 		    1 2       DIM     DIMS(X)
 		    | |        |         |
 		  Y(:,:, ... INDEX, ..., :)=X;		
 
    where the location of INDEX is specified by DIM.  X must have the
    exact same size as the block it replaces, or be a scalar.  
    
    VINDEXINTO is defined leave Y unchanged if INDEX is empty, and to 
    ignore NANs and INFs in INDEX.  
 
    VINDEXINTO(Y,X,INDEX,0) with DIM=0 is equivalent to Y(INDEX)=X;
   
    [Y1,Y2,...YN]=VINDEXINTO(Y1,Y2,...YN,X1,X2,...XN,INDEX,DIM) also 
    works.
 
    VINDEXINTO(Y1,Y2,...YN,X1,X2,...XN,INDEX,DIM); with no output 
    arguments overwrites the original input variables ,Y2,...YN.
 
    See also VINDEX, SQUEEZE, DIMS, PERMUTE, SHIFTDIM
 
    'vindexinto --t' runs a test.
    __________________________________________________________________
    This is part of JLAB --- type 'help jlab' for more information
    (C) 2005--2014 J.M. Lilly --- type 'help jlab_license' for details

contents | allhelp | index