View Raw SPL
/*****************************************************************************
*                                                                            *
*   ISXYZ.SPL     Copyright (C) 2010 DSP Development Corporation             *
*                               All Rights Reserved                          *
*                                                                            *
*   Author:      Randy Race                                                  *
*                                                                            *
*   Synopsis:    Returns 1 if input is an xyz series                         *
*                                                                            *
*   Revisions:   10 Dec 2010  RRR  Creation                                  *
*                                                                            *
*****************************************************************************/

#include 


#if @HELP_ISXYZ

    ISXYZ

    Purpose: Returns 1 if input parameter is an xyz series

    Syntax:  ISXYZ(val)

              val - series, array or string input

    Returns: The array 1 if the input is an xyz series, else 0.

    Example:
             s1 = gsin(100, 1/100);
             s2 = gcos(100, 1/100);
             s3 = 1..100;
             s4 = xyz(s1, s2, s3);

             isxyz(s1) == 0
             isxyz(s2) == 0
             isxyz(s3) == 0
             isxyz(s4) == 1

    Example:
             isxyz(3)

             returns 0

    Remarks:
             If the input is not a series, isxyz returns 0.

    See Also:
             isarray
             iscomplex
             isreal
             isscalar
             isxy

#endif


/* is series XYZ? */
isxyz(s)
{
        local status = 0;

        if (argc < 1) s = refwin(w0);

        if (isarray(s))
        {
                status = ISXYZSERIES(s);
        }
        
        return(status == 1);
}