MATLAB Answers

0

How to change the legend in simulation data inspector?

Asked by Udhaya K on 5 Jun 2019
Latest activity Answered by Jesús Zambrano on 5 Aug 2019
I am beginner in Matlab. I started working on building a classic spring mass damper system and I have reached a confident position in building it. I have few doubts in the output:
  1. In the simulation data inspector, I see the legends of curves having a prefix name as "dataToImport."signal name"". I only want the signal name to appear. How do I change this?
Matlab legend doubt.JPG
2. The graphs look to be of lower resolution. Too many sharp points seen as against the expected smooth sinusoidal-like curve. How to increase this resolution
3. If I want to see the exact value of signal "position" at time t=2s, how to get this info.?

  0 Comments

Sign in to comment.

1 Answer

Answer by Jesús Zambrano on 5 Aug 2019

Hi Udhaya,
Here I write you some possible solutions/suggestions to your questions:
1) The Simulink Data Inspector use as legend the signal name you assign in the Simulink model. Otherwise, if there is no name in the signal, it takes the name of the source of the signal (for example, if the signal comes from a Sine Wave block, the signal in the SDI will have legend "Sine Wave: 1". In your case, it seems you are plotting from a bus. If you want them to appear as single names, then try to rebuild the model with out using buses.
2) To increase the resolution the resolution, go to your Simulink implementation, then in the menu: Simulation > Model Configuration Parameters > Solver > Solver details. Once in there, you can modify the step size of your solver, so to get a smoother solution of your system (more points calculated).
3) Click on the signal you are interested, and in the top menu of the SDI, click on "show/hide data cursor". With this, you can move a cursor and it will display the time and signal value along the plot.
Hope this answers can help you in your questions!

  0 Comments

Sign in to comment.