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.