countNanInf
Syntax
countNanInf(X, [includeNull=false])
Details
An aggregate function that counts the number of NaN values and Inf values in X. When includeNull = true, the result includes the number of null values.
Parameters
X is a DOUBLE type scalar, vector or matrix.
includeNull (optional) is a BOOLEAN value. The default value is false.
Returns
A scalar of type INT.
Examples
x = [1.5, float(`nan), 2.3, float(`inf), NULL, 3.7]
// includeNull = false (defaule), the result does not include the number of null values
countNanInf(x)
// output: 2
// includeNull = true, the result includes the number of null values
countNanInf(x,true)
// output: 3
Related function: isNanInf
