Skip to content

Instantly share code, notes, and snippets.

@theredpea
Last active August 29, 2015 13:56
Show Gist options
  • Save theredpea/9333549 to your computer and use it in GitHub Desktop.
Save theredpea/9333549 to your computer and use it in GitHub Desktop.
import math
#maximum *symbol* rate is 2B
#V signal levels; ignoring noise, max bit rate is:
def nyquistLimit(bandwidth=0.00, numSignalLevels=0.00):
B=bandwidth
V=numSignalLevels
numSamplesPerSecond = 0.5#frequency
numSecondsPerSample = 1/numSamplesPerSecond #1/frequency
return 2* B * math.log(V,2)
print(nyquistLimit(5, 8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment