natstobits takes a value in nats (a double) as input and returns the value in bits (a double).
Usage
natstobits(H)
Arguments
H
double denoting a value (in nats), as returned by one of the function of the infotheo package
Value
natstobits returns a double that is the conversion of the nats value into bits.
Details
Information-theoretic quantities can have different units depending on the base of the logarithm used in their computation.
All the function of tha package use a base e, hence the unit is the nat. The value in bit is given by using the base 2,
hence the conversion is done by multiplying by log2(e) = 1.442695.