>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  ONE2THREE

ONE2THREE

ONE2THREE

Name


      ONE2THREE

Purpose


      Convert from 1-d indices to 3-d indices.

Category


Calling Sequence


      one2three, in, arr, ix, iy, iz

Inputs


      in = 1-d indices (may be a scalar). in
      arr = array to use (for size only). in
        Alternatively, arr can be [nx, ny, nz]
        where nx, ny, and nz are the array sizes
        in x, y, and z (saves space).

Keyword Parameters


Outputs


      ix, iy, iz = equivalent 3-d indices. out
        ix is a 1-d array of indices in the x dimension.
        iy is a 1-d array of indices in the y dimension.
        iz is a 1-d array of indices in the z dimension.

Common Blocks


Notes


      Note: works for 2-d arrays also, just returns iz=0.
      May give [nx,ny] instead of arr for the 2-d case.

Modification History


      R. Sterner, 2001 Oct 01
      R. Sterner, 2008 Feb 29 --- Changed in to in[0:*] to force 1-d output.
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 2001, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us