short

From DavinciWiki
Jump to: navigation, search


64-bit SafeYes

Description

Convert an object to SHORT format

Arguments and Return Values

Arguments: Any three dimensional numeric array

Return Value: The array converted into SHORT format

Usage

Syntax: short(object = VAL)

The short() function copies and converts an object to SHORT format. Any values above or below the maximum representable values of -32767,32768 are set to the closest representable value.

Note that this function uses rounding towards zero [see the fix() function] when translating double or float data; to avoid potentially unexpected results, use short(round(data)) which will force rounding towards the nearest integer.

This function is equivalent to format(object=VAL, format=SHORT).

Examples

dv> a
329x7183x1 array of float, bsq format [9,452,828 bytes]

dv> short(a)
329x7183x1 array of short, bsq format [4,726,414 bytes]

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

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

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 10-19-2016

Personal tools