Example: Using a Simulink Model with BERTool

This example illustrates how BERTool can manage a series of simulations of a Simulink model, and how you can vary the plot. The model is graycode, one of the demonstration models included with the Communications Blockset. The example assumes that you have the Communications Blockset installed.

To run this example, follow these steps:

  1. Open BERTool and go to the Monte Carlo panel. Notice that the model's filename, graycode.mdl, appears as the Simulation M-file or model parameter. (If viterbisim.m appears there, then check that the Communications Blockset is installed.)

  2. Click Run.

    BERTool loads the model into memory (which in turn initializes several variables in the MATLAB workspace), runs the simulation once for each value of Eb/N0, and gathers BER data. Then BERTool creates a listing in the data viewer.

    BERTool plots the data in the BER Figure window.

  3. To fit a curve to the series of points in the BER Figure window, check the box next to Fit in the data viewer.

    BERTool plots the curve, as below.

  4. To indicate the 99% confidence interval around each point in the simulation data, set Confidence Level to 99% in the data viewer.

    BERTool displays error bars to represent the confidence intervals, as below.

Another example that uses BERTool to manage a series of Simulink simulations is in Example: Preparing a Model for Use with BERTool.


© 1994-2005 The MathWorks, Inc.