NAME

       minmax - Find extreme values in data tables


SYNOPSIS

       minmax  [  files]  [  -C  ]  [  -D  ]  [  -EL|l|H|hcol ] [ -H[nrec] ] [
       -Idx[/dy[/dz...] ] [ -M[flag] ] [ -Tdz  ]  [  -:  ]  [  -bi[s][n]  ]  [
       -f[i|o]colinfo ]


DESCRIPTION

       minmax  reads  its standard input [or from files] and finds the extreme
       values in each of the columns. It recognizes NaNs and will print  warn-
       ings  if  the  number  of  columns  vary  from record to record.  As an
       option, minmax will find the extent of the first n columns  rounded  up
       and  down  to  the  nearest  multiple  of  the  supplied increments. By
       default, this output will be in the form -Rw/e/s/n which  can  be  used
       directly  in  the command line for other programs (hence only dx and dy
       are neede), or the output will be in column form for as many columns as
       there  are  increments  provided.  A similar option (-T) will provide a
       -Tzmin/zmax/dz string for makecpt.

       xyzfile
              ASCII [or binary, see -b] file(s) holding a fixed number of data
              columns.


OPTIONS

       -C     Report  the  min/max  values  per  column  in  separate  columns
              [Default uses <min/max> format].

       -D     Sets  longitude  discontinuity  to  the   Dateline   (-180/+180)
              [Default is Greenwich (0-360)].  Requires -L.

       -E     Returns  the record whose column col contains the minimum (l) or
              maximum (h) value. Upper case (L|H) works on absolute  value  of
              the  data. In case of multiple matches, only the first record is
              returned.

       -H     Input file(s) has Header record(s). Number of header records can
              be  changed  by  editing  your  .gmtdefaults4 file. If used, GMT
              default is 1 header record. Use -Hi if only  input  data  should
              have  header  records  [Default will write out header records if
              the input data have them].

       -I     Report the min/max of the first n columns to the nearest  multi-
              ple  of  the  provided  increments (separate the n increments by
              slashes), and output results in the form -Rw/e/s/n (unless -C is
              set). If only one increment is given we also use it for the sec-
              ond column  (for  backwards  compatibility).  To  override  this
              behaviour, use -Ipdx.

       -M     Multiple  segment  file(s).  Segments are separated by a special
              record.  For ASCII  files  the  first  character  must  be  flag
              [Default  is  ’>’].  For binary files all fields must be NaN and
              -bo[s]n must set the number of output columns explicitly.

       -T     Report the min/max of the first column to the  nearest  multiple
              of dz and output this in the form -Tzmin/zmax/dz.

       -:     Toggles  between  (longitude,latitude)  and (latitude,longitude)
              input and/or output. [Default is (longitude,latitude)].   Append
              i  to  select  input  only  or o to select output only. [Default
              affects both].  Only works when -I is selected.

       -bi    Selects binary input. Append s for single precision [Default  is
              double].   Append  n  for  the  number  of columns in the binary
              file(s).
              [Default is 2 input columns].

       -f     Special formatting of input and output  columns  (time  or  geo-
              graphical  data)  Specify  i(nput)  or o(utput) [Default is both
              input and output].  Give one or more columns (or column  ranges)
              separated by commas.  Append T (Absolute calendar time), t (time
              relative to chosen TIME_EPOCH), x (longitude), y  (latitude),  g
              (geographic coordinate), or f (floating point) to each column or
              column range item.


EXAMPLES

       To find the extreme values in the file ship_gravity.xygd:

       minmax ship_gravity.xygd

       Output should look like

       ship_gravity.xygd:  N  =  6992   <326.125/334.684>   <-28.0711/-8.6837>
       <-47.7/177.6> <0.6/3544.9>

       To  find the extreme values in the file track.xy to the nearest 5 units
       and use this region to draw a line using psxy, run

       psxy ‘minmax -I5 track.xy‘ track.xy -Jx1 -B5 -P > track.ps

       To find the min and max values for each of the  first  4  columns,  but
       rounded to integers, use

       minmax junkfile -C -I1/1/1/1


SEE ALSO

       gmt(l)



GMT4.0                            1 Oct 2004                         MINMAX(l)

Man(1) output converted with man2html