View Raw SPL
/*****************************************************************************
* *
* ISXY.SPL Copyright (C) 2010 DSP Development Corporation *
* All Rights Reserved *
* *
* Author: Randy Race *
* *
* Synopsis: Returns 1 if input is an xy series *
* *
* Revisions: 21 Jul 2010 RRR Creation *
* *
*****************************************************************************/
#include
#if @HELP_ISXY
ISXY
Purpose: Returns 1 if input parameter is an xy series
Syntax: ISXY(val)
val - series, array or string input
Returns: The array 1 if the input is an xy series, else 0.
Example:
s1 = grand(100, 1);
s2 = xy(1..100, s1);
isxy(s1) == 0
isxy(s2) == 1
Example:
isxy(3)
returns 0
Remarks:
If the input is not a series, isxy returns 0.
See Also:
isarray
iscomplex
isreal
isscalar
isxyz
#endif
/* is series XY? */
isxy(s)
{
local status = 0;
if (argc < 1) s = refwin(w0);
if (isarray(s) && length(s) > 0)
{
status = ISXYSERIES(s);
}
return(status == 1);
}