int16

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
(Add int16 for 2.18)
 
Line 24: Line 24:
 
  dv> int16(a)
 
  dv> int16(a)
 
  4x3x2 array of int16, bsq format [48 bytes]
 
  4x3x2 array of int16, bsq format [48 bytes]
  -32768   -11   -10   -9
+
  -32768 -11   -10   -9
  -8   -7    -6    -5
+
  -8     -7    -6    -5
  -4   -3    -2    -1
+
  -4     -3    -2    -1
 
   
 
   
  0   1   2   3
+
  0     1     2     3
  4   5   6   7
+
  4     5     6     7
  8   9   10    32767
+
  8     9     10    32767
  
 
|
 
|
Line 39: Line 39:
 
*[[uint32]]
 
*[[uint32]]
 
*[[uint64]]
 
*[[uint64]]
*[[int16]]
+
*[[int8]]
 
*[[int32]]
 
*[[int32]]
 
*[[int64]]
 
*[[int64]]

Revision as of 12:58, 18 November 2016



64-bit SafeYes

Description

Convert an object to int16 format.

Arguments and Return Values

Arguments: Any three dimensional numeric array

Return Value: The array converted into int16 (-32768, 32767)

Usage

Syntax: int16(object = VAL)

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

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> int16(a)
4x3x2 array of int16, bsq format [48 bytes]
-32768 -11   -10   -9
-8     -7    -6    -5
-4     -3    -2    -1

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


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