| Communications Toolbox | ![]() |
When you create a MATLAB simulation function for use with BERTool, you must control the flow so that the simulation ends when it either detects a target number of errors or processes a maximum number of bits, whichever occurs first. To learn more about this requirement, see Requirements for Functions; for an example, see Example: Preparing a Simulation Function for Use with BERTool.
After creating your function, you set the target number of errors and the maximum number of bits in the Monte Carlo panel of BERTool.

Typically, a Number of errors value of at least 100 produces an accurate error rate. The Number of bits value prevents the simulation from running too long, especially at large values of Eb/N0. However, if the Number of bits value is so small that the simulation collects very few errors, then the error rate might not be accurate. You can use confidence intervals to gauge the accuracy of the error rates that your simulation produces; the larger the confidence interval, the less accurate the computed error rate.
As an example, follow the procedure described in Example: Using a MATLAB Simulation with BERTool and then set Confidence Level to 95 for each of the two data sets. Notice that the confidence intervals for the second data set are larger than those for the first data set. This is because the second data set uses a small value for Number of bits, relative to the communication system properties and the values in Eb/No range, resulting in BER values based on only a small number of observed errors.
Note You can also use the Stop button in BERTool to stop a series of simulations prematurely, as long as your function is set up to detect and react to the button press. |
| Example: Using a MATLAB Simulation with BERTool | Plotting Confidence Intervals | ![]() |
© 1994-2005 The MathWorks, Inc.