fn_indices
Contents
Syntax
globi = fn_indices(sizes|array,i,j,k,...[,'s2g']) globi = fn_indices(sizes|array,ijk[,'s2g']) [i j k...] = fn_indices(sizes|array,globi[,'g2s']) ijk = fn_indices(sizes|array,globi[,'g2s'])
Description
converts between global and per-coordinate indices
Input: - array array - use conversion for array of this size (we note nd its number of dimensions) - size vector - sizes of the array
Input/Output: - i,j,k scalar or vectors of the same length N - per-coordinates indices - ijk nd vector or nd x N array - per-coordinates indices - globi scalar or vector of length N - global indices
Whenever the input indices are out of bound, the output indices are set to zero.
See also fn_imvect, fn_subsref
Source
Thomas Deneux
Copyright 2004-2017