int8

From DavinciWiki
Jump to: navigation, search


64-bit SafeYes

Description

Convert an object to int8 format.

Arguments and Return Values

Arguments: Any three dimensional numeric array

Return Value: The array converted into int8 (-128 - 127)

Usage

Syntax: int8(object = VAL)

The int8() function copies and converts an object to int8 format. Any values above or below the maximum representable values of -128, 127 are set to the nearest representable value. This function is equivalent to format(object=VAL, format=int8).

All values are truncated.

Examples


dv> a
4x3x2 array of double, bsq format [192 bytes]
-5.00000e+09    -11.0000    -10.0000    -9.00000
-8.00000    -7.00000    -6.00000    -5.00000
-4.00000    -3.00000    -2.00000    -1.00000

0.00000    1.00000    2.00000    3.00000
4.00000    5.00000    6.00000    7.00000
8.00000    9.00000    10.0000    5.00000e+09
dv> int8(a)
4x3x2 array of int8, bsq format [24 bytes]
-128    -11    -10    -9
-8    -7    -6    -5
-4    -3    -2    -1

0    1    2    3
4    5    6    7
8    9    10    127


DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Recent Core Changes

Modified On: 11-18-2016

Personal tools