Getting Started    

Simulating Noise with Imported Data

You can also use the Signal From Workspace block to simulate channel noise with specific error patterns, in order to test the performance of an error correcting code. An example of this is shown in the following figure.

Using Data from the Workspace to Simulate Errors

This example is similar to the model shown in the figure Hamming Code Model, but instead of using the Binary Symmetric Channel block to simulate noise, the model imports error data from the workspace.

To build this model, follow these steps:

  1. Type hammingdoc at the MATLAB prompt to open the Hamming code model. Then save the model under a different name in the directory where you store your work files.
  2. Delete the Binary Symmetric Channel block from the model.
  3. Drag the following blocks into the model window:
  4. Connect these blocks as shown in the preceding figure.
  5. In the Simulation menu, select Simulation Parameters to open the Simulation Parameters dialog box.
  6. In the Solver pane, type length(errors) in the Stop time field.
  7. Click OK.
  8. Double-click the Signal From Workspace block and make the following changes to the default parameters in the block's mask:
  9. Double-click the Logical Operator block and set Operator to XOR in the block's mask.

  Importing Data from the MATLAB Workspace Simulating Noise with Specified Error Patterns