MATLAB Application Program Interface Reference Help Desk

mexIsGlobal

Purpose

True if mxArray has global scope

C Syntax

Arguments

array_ptr

Pointer to an mxArray.

Returns

true if the mxArray has global scope; otherwise, returns false.

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 mexIsGlobal.c in the mex subdirectory of the examples directory.

See Also

mexGetArray, mexGetArrayPtr, mexPutArray



[ Previous | Help Desk | Next ]