In [ ]:
using PyPlot, PyCall
@pyimport scipy.special as scipy_special
In [ ]:
SNRs_dB = -10:30
SNRs = 10.^(SNRs_dB/10)
longterm_rates = (1/log(2))*exp(1./SNRs + log(scipy_special.exp1(1./SNRs)))
longterm_rates_upper_bound = log2(1 + SNRs)
longterm_rates_lower_bound = 0.5*log2(1 + 2*SNRs);
In [ ]:
plot(SNRs_dB, longterm_rates, "b", label="True longterm rates")
plot(SNRs_dB, longterm_rates_upper_bound, "r", label="Upper bound")
plot(SNRs_dB, longterm_rates_lower_bound, "k", label="Lower bound")
title("Longterm rates compared to bounds")
xlabel("Signal-to-noise ratio [dB]")
legend(loc="best")
In [ ]: