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






      N'th group of identical elements from a given array.'


Calling Sequence

      g = getgroup(a, n, [m])


      a = array to process. in
      n = group number to get (first = 0 = def). in
      m = optional last group number to get. in

Keyword Parameters


        LOCATION = l. Return group n start location.
        /LAST means n is offset from last group. So n=0 gives
          last group, n=-1 gives next to last, ...
          If n=-2 and m=0 then last 3 groups are returned.
        /LONGEST returns the longest group. n returned, m ignored.


      g = returned group or groups. out

Common Blocks


      Note: Getgroup works on any array type that allows.
        the EQ operator.
        See ngroups.

Modification History

      R. Sterner, 1999 Aug 02
      R. Sterner, 2010 Jun 07 --- Converted arrays from () to [].
      R. Sterner, 2010 Jun 07 --- Set d[0]=0, was missing first group.
  Copyright (C) 1999, 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.

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