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

GETGROUP

GETGROUP

Name


      GETGROUP

Purpose


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

Category


Calling Sequence


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

Inputs


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

Keyword Parameters


Keywords


        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.

Outputs


      g = returned group or groups. out

Common Blocks


Notes


      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.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us