Real-Time Windows Target    

Plotting Logged Signal Data

You can use the MATLAB plotting functions for visualizing nonreal-time simulated data or real-time application data.

After running your real-time application and logging data to the MATLAB workspace, you can plot the data. This procedure uses the Simulink model rtwin_model.mdl as an example, and assumes you saved your data to the variable ScopeData:

  1. In the MATLAB command window, type
  1. MATLAB lists the structure of the variable ScopeData. The variable ScopeData is a MATLAB structure containing the fields time vector, signal structure, and a string containing the block name.

    To list the contents of the structure signals, type

    MATLAB lists the structure of the variable ScopeData.signals. This structure contains one or more vectors of signal data depending on the number of signal inputs to the Scope block.

  1. To plot the first 1000 points, type
  1. MATLAB plots the first 1000 samples from 0.0000 to 0.9990 seconds.

  1. The variable ScopeData is not automatically saved to your hard disk. To save the variable ScopeData, type
  1. MATLAB saves the scope data to the file ScopeData.mat.


  Entering Signal and Triggering Properties Signal Logging to a Disk Drive