From DavinciWiki
Revision as of 12:34, 2 May 2013 by Cedwards (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Converts numeric values to 16-bit signed integers, while preserving their relative scale

Arguments and Return Values

Arguments: a numeric array, and optionally the minimum and maximum values to use for the output data

Return Value: A short array


Syntax: toshort(inputdata, [, minval = VAL] [, maxval = VAL])

This is a wrapper for tointeger, in which the integertype parameter of that function is specified as "short".


dv> d
4x1x1 array of float, bsq format [16 bytes]
0.5000000000    0.0000000000    0.7500000000    1.000000000

dv> toshort(d)
4x1x1 array of short, bsq format [8 bytes]
0       -32768  16383   32767

DavinciWiki Mini-Nav Bar


Contact Developers

  • davinci-dev [AT]

All other topics

  • See navigation on the left

Related Functions

Recent Library Changes

Created On: 07-16-2012
Modified On: 05-02-2013

Personal tools