powered by
The function decode converts a binary number with m digits to a real number between the lower and upper bound.
decode(bin, lb, ub, m)
A binary number
Lower bound of real number
Upper bound of real number
Number of the digits of output value.
Returns the real equivalent of the input number.
This function converts a binary number with m digits to its real equivalent expressed in the range [lb, ub].
encode
# NOT RUN { x = c(0,1,0,0,0,0,1,1) decode(x, lb=50, ub=250, m=8) # }
Run the code above in your browser using DataLab