<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/LECTURE/

inverse_binary.pro

topinverse_binary

result = inverse_binary(binnumb)

NAME: inverse_binary PURPOSE: inverse function of the binary.pro function => given a input array of 0/1, return its corresponding byte/integer/long representation CATEGORY: CALLING SEQUENCE: res = inverse_binary(binnum) INPUTS: binnum must be a binary type array containing only 0 and 1. According to binary.pro outputs, binnum array must have the following dimensions values: (8, t, d1, d2...) t gives the output type: t = 1 -> byte t = 2 -> integer t = 4 -> long (d1, d2...) are the output dimensions KEYWORD PARAMETERS: no OUTPUTS: a byte/integer/long array with (d1, d2...) dimensions COMMON BLOCKS: no RESTRICTIONS:the binary number can represent only byte/integer/long EXAMPLE: IDL> a=indgen(5) IDL> b=binary(a) IDL> help, b B BYTE = Array[8, 2, 5] IDL> print, b 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 IDL> help, inverse_binary(b) INT = Array[5] IDL> print, inverse_binary(b) 0 1 2 3 4 MODIFICATION HISTORY:

Parameters

binnumb       

Produced by IDLdoc 2.0.