Skip to content

Instantly share code, notes, and snippets.

@theredpea
Created March 4, 2014 02:31
Show Gist options
  • Save theredpea/9339225 to your computer and use it in GitHub Desktop.
Save theredpea/9339225 to your computer and use it in GitHub Desktop.
import math
def shannonCapacity(bandwidth, signal=0.0, noise=0.0, snr=0.0):
B = bandwidth
S = signal
N = noise
return B* math.log((1+(snr or S/N)),2)
print(shannonCapacity(20, snr=1000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment