decode: Convert from binary number to real number

View source: R/decode.R

decodeR 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)

adana documentation built on March 18, 2022, 6:03 p.m.

Related to decode in adana...