Home > ISET > utility > ieNotDefined.m

ieNotDefined

PURPOSE ^

Test whether a variable (usually a function argument) is defined

SYNOPSIS ^

function notDefined = ieNotDefined( varString )

DESCRIPTION ^

Test whether a variable (usually a function argument) is defined

 notDefined = ieNotDefined( varString )

 Purpose:
    This routine is used to determine if a variable is defined in the
    calling function's workspace.  A variable is defined if (a) it exists
    and (b) it is not empty. This routine is used throughout the ISET code
    to test whether arguments have been passed to the routine or a default
    should be assigned.

 notDefined: 1 (true) if the variable is not defined in the calling workspace 
             0 (false) if the variable is defined in the calling workspace

  Defined means the variable exists and is not empty in the function that
  called this function.  

  This routine replaced many calls of the form
    if ~exist('varname','var') | isempty(xxx), ... end

    with 

    if ieNotDefined('varname'), ... end

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 14-Jan-2007 10:24:23 by m2html © 2003