MATLAB Application Program Interface
  Go to function:
    Search    Help Desk 
mxIsEmpty    Examples   See Also

True if mxArray is empty

C Syntax

Arguments

array_ptr
  Pointer to an array.

Returns

true if the mxArray is empty; otherwise, returns false.

Description

Use mxIsEmpty to determine if an mxArray is empty. An mxArray is empty if the size of any of its dimensions is 0.

Attempts to access empty mxArray cause undesirable behavior. To avoid accessing empty arrays, test them by calling mxIsEmpty.

Note that mxIsEmpty is not the opposite of mxIsFull.

Examples

mxGetScalar returns an indeterminate value if passed an empty mxArray.
To avoid this situation, call mxIsEmpty first:

For an additional example, see mxisempty.c in the mx subdirectory of the examples directory.

See Also

mxIsClass



[ Previous | Help Desk | Next ]