如何在Python中计算AWGN通道中的错误概率?

时间:2018-07-23 05:04:15

标签: python probability

我找到了一篇关于错误概率计算的论文。但是,我不知道如何使用等式3和4绘制图形。 这些是等式列表:

enter image description here

enter image description here

这是图形:

enter image description here

这是我用来生成图形的Python代码,但是,它没有显示正确的图形:

x=[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]
sigma=np.array(x)
bins=4+sigma 
mu=bins/4
y=1/(sigma * np.sqrt(2 * np.pi)) *np.exp( - (bins - mu)**2 / (2 * sigma**2))                                       

plt.plot(x,np.log10(y))
plt.xlabel('Noise variance')
plt.ylabel('Probability of error')
plt.scatter(x,np.log10(y))
plt.show()

我希望这个论坛中的任何人都可以引导我绘制此图。 谢谢。

0 个答案:

没有答案