| Communications Toolbox | ![]() |
When you create a MATLAB function for use with BERTool, you must ensure that the function interacts properly with the GUI. This section describes the inputs, outputs, and basic operation of a BERTool-compatible function.
BERTool evaluates your entries in fields of the GUI and passes data to the function as these input arguments, in sequence:
One value from the Eb/No range vector each time BERTool invokes the simulation function
The Number of errors value
The Number of bits value
Your simulation function must compute and return these output arguments, in sequence:
Bit error rate of the simulation
Number of bits processed when computing the BER
BERTool uses these output arguments when reporting and plotting results.
Your simulation function must perform these tasks:
Simulate the communication system for the Eb/N0 value specified in the first input argument.
Stop simulating when the number of errors or the number of processed bits equals or exceeds the corresponding threshold specified in the second or third input argument, respectively.
Detect whether you click the Stop button in BERTool and abort the simulation in that case.
| Preparing Simulation Functions for Use with BERTool | Template for a Simulation Function | ![]() |
© 1994-2005 The MathWorks, Inc.