NAG Toolbox: nag_int
Purpose
nag_int generates integer values of type int32 or int64 depending on the
implementation of the toolbox in use.
Syntax
[ival] = nag_int(val)
Description
nag_int casts a double value to either int32 or int64 depending on the
implementation of the toolblox in use.
The main use of this function is to allow code to be written that is
portable between the 32 and 64 bit versions of the Toolbox.
References
None.
Parameters
Input Parameter
- 1:
val – matlab value
-
Typically this is a scalar double
value or an array of doubles.
Output Parameter
- 1:
ival – int64
-
The input value will be cast to
int32 or int64 using the primitive matlab int32 or int64 function as appropriate.
Error Indicators and Warnings
None.
Example
[ival] = nag_int(2)
ival =
2
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2014