How can I compute a graph with BER and EbN0 values

35 views (last 30 days)
Now I have got images in the proper colour, I am wondering as to how plot a graph to show the Bit Error Rate to EbN0 in dB. I have found an example plot in another report but how can I plot this myself?
I know that semilogy is required for this but I am unsure where to start if anyone could point me to a MATLAB example or give any guidance on where to start with this?
Thanks in advance

Answers (1)

Umar
Umar on 5 Jul 2024

Hi Liam,

To plot the Bit Error Rate (BER) against Eb/N0 in dB using MATLAB, you can follow these steps:Calculate the BER values for different Eb/N0 ratios. Then, convert the Eb/N0 ratios to dB scale. Finally, use the semilogy function to plot the BER values against the Eb/N0 in dB. Here is an example to help you out. For more information regarding semilogy function, please refer to

https://www.mathworks.com/help/matlab/ref/semilogy.html#

>> % Generate Eb/N0 values in dB EbN0_dB = -10:0.5:10;

% Calculate corresponding BER values (example values) BER = 0.5 * erfc(sqrt(10.^(EbN0_dB/10)));

% Plot the BER vs. Eb/N0 semilogy(EbN0_dB, BER, 'o-'); xlabel('Eb/N0 (dB)'); ylabel('Bit Error Rate (BER)'); title('BER vs. Eb/N0 Plot'); grid on;

Please see attached plot.

You can adjust the range of Eb/N0 values and the BER calculation based on your specific requirements. This code will help you visualize the relationship between BER and Eb/N0 in dB using a logarithmic scale for BER.

Categories

Find more on Weather and Atmospheric Science in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!