View Raw SPL
/*****************************************************************************
*                                                                            *
*   ROWMIN.SPL       Copyright (C) 2004 DSP Development Corporation          *
*                               All Rights Reserved                          *
*                                                                            *
*   Author:      Randy Race                                                  *
*                                                                            *
*   Synopsis:    Produces a column of the minimum of each row of an array    *
*                                                                            *
*   Revisions:   30 Mar 2004  RRR  Creation                                  *
*                                                                            *
*****************************************************************************/


#if @HELP_ROWMIN

    ROWMIN

    Purpose: Produces a column of the minimum of each row of a table.

    Syntax:  ROWMIN(table)

              table - A series, table or expression evaluating to a series
                      or table.

    Returns: A single column series with the same number of rows as the
             input table.

    Example:
             a = {{2,  4,  6},
                  {8, 10, 12}}

             b = rowmin(a)

             b == {2, 8}

    Remarks:
             ROWMIN uses ROWREDUCE to find the row minima.

    See Also:
             Colmin
             Min
             Row
             Rowlen
             Rowmax
             Rowmean
             Rowreduce
             Rowstdev
             Rowsum
             Transpose
#endif


/* calculate the row minima */
rowmin(a)
{
        return(rowreduce(a, 27));
}