decode {adana}R Documentation

Convert from binary number to real number

Description

The function decode converts a binary number with m digits to a real number between the lower and upper bound.

Usage

decode(bin, lb, ub, m)

Arguments

bin

A binary number

lb

Lower bound of real number

ub

Upper bound of real number

m

Number of the digits of output value.

Details

This function converts a binary number with m digits to its real equivalent expressed in the range [lb, ub].

Value

Returns the real equivalent of the input number.

Author(s)

Zeynel Cebeci & Erkut Tekeli

See Also

encode

Examples

x = c(0,1,0,0,0,0,1,1)
decode(x, lb=50, ub=250, m=8)

[Package adana version 1.1.0 Index]