Name
is_empty — check if a variable is empty
CALLING SEQUENCE
b=is_empty(v)
PARAMETERS
- Input
v = a matrix, a list or a ts
- Output
b = a boolean equal to %t is the variable is empty, %f if it is not
DESCRIPTION
This is a simple extension of Scilab function isempty, extended to deal with ts. Note that, even if it is possible to create an empty ts, this extension is useful mainly to deal with entries to econometric functions and prevent isempty to send an error when it meets a ts.
EXAMPLE
1)a=1;is_empty(a(2:$))
2)is_empty(find(rand(1:10)==5))
3)load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat');is_empty(lm1)
Examples 1 and 2 are the simple transposition of Scilab help for function isempty. Example 3 shows the extension to ts.