<< invvech Basic functions is_scalar >>

Grocer >> Basic functions > is_empty

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

a=1;is_empty(a(2:$))
// simple transposition of Scilab help for function isempty
 
is_empty(find(rand(1:10)==5))
// simple transposition of Scilab help for function isempty
 
load(GROCERDIR+'/macros/grocer/db/bdhenderic.dat');is_empty(lm1)
// shows the extension to ts.

AUTHOR

Eric Dubois 2006

Report an issue
<< invvech Basic functions is_scalar >>