| External Interfaces Reference | ![]() |
Get real component of first data element in mxArray
Fortran Syntax
Arguments
Returns
The value of the first real (nonimaginary) element of the mxArray. If pm points to a sparse mxArray, mxGetScalar returns the value of the first nonzero real element in the mxArray.
If pm points to an empty mxArray, mxGetScalar returns an indeterminate value.
Description
Call mxGetScalar to get the value of the first real (nonimaginary) element of the mxArray.
In most cases, you call mxGetScalar when pm points to an mxArray containing only one element (a scalar). However, pm can point to an mxArray containing many elements. If pm points to an mxArray containing multiple elements, mxGetScalar returns the value of the first real element. If pm points to a two-dimensional mxArray, mxGetScalar returns the value of the (1,1) element.
See Also
| mxGetPr | mxGetString | ![]() |
© 1994-2005 The MathWorks, Inc.