Simulation Data Inspector plots are missing data

I have a signal being logged, which is an Accelerometer signal  multiplied by a constant number (which is the conversion from Volts to m/s^2). Frequently, I face the issue that when the signal is viewed on the Simulink Data Inspector it looks like a set of stairs/blocky signals. When I export this to the Workspace and plot it using MATLAB it looks fine. Why is this happening?

 Accepted Answer

By default, signals are plotted immediately in the SDI, as they are generated by the SLRT model running in real-time. The SLRT kernel stores the data in a network buffer to send to the desktop computer and plot, this buffer can be overrun, and data lost in the process. Regardless, the data is always saved and stored for later analysis, and all data is being passed between the model's component in real-time. This is why the signal looks different when plotted while simulating vs when plotted after loading to the Workspace. 
You can change the plotting mode in SDI for simulations. To read more about this, execute the following command in the MATLAB R2020a command window to access the release-specific documentation:
>> web(fullfile(docroot, 'xpc/ug/minimize-data-loss-with-simulation-data-inspector-buffered-mode.html'))
For information regarding the current release, please visit the following link:

More Answers (0)

Categories

Find more on View and Analyze Simulation Results in Help Center and File Exchange

Products

Release

R2019a

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!