External Interfaces/API Reference    
mexIsGlobal

True if mxArray has global scope

C Syntax

Arguments
array_ptr
   Pointer to an mxArray.

Returns

True if the mxArray has global scope, and false otherwise.

Description

Use mexIsGlobal to determine if the specified mxArray has global scope.

By default, mxArrays have local scope, meaning that changes made to the mxArray inside a MEX-file or stand-alone application have no effect on a variable of the same name in another workspace. However, if an mxArray has global scope, then changes made to the mxArray inside a MEX-file or stand-alone application can affect other workspaces.

The MATLAB global command gives global scope to a MATLAB variable. For example, to make variable x global, just type

The most common use of mexIsGlobal is to determine if an mxArray stored inside a MAT-files is global.

Example

See mxislogical.c in the mx subdirectory of the examples directory.

See Also

mexGetArray, mexGetArrayPtr, mexPutArray


 mexIsFinite (Obsolete) mexIsInf (Obsolete)