How to change the dashboard x axis

8 vues (au cours des 30 derniers jours)
Ajay Krishna Vasanthakumar
Ajay Krishna Vasanthakumar le 11 Juin 2025
Commenté : Abhishek le 20 Juin 2025
I want the Dashboard x axis based on other signal at current time step. how can i do this
  2 commentaires
Walter Roberson
Walter Roberson le 11 Juin 2025
Ajay Krishna Vasanthakumar
Ajay Krishna Vasanthakumar le 19 Juin 2025
In Dashboard scope it is always signal vs Time

Connectez-vous pour commenter.

Réponses (1)

Abhishek
Abhishek le 16 Juin 2025
I understand that you are trying to configure the Dashboard Scope block in Simulink such that the X-axis is based on another signal (not simulation time).
Unfortunately, the Dashboard Scope block does not support customizing the X-axis. It is designed to display connected signals against simulation time only, and this behavior is not configurable.
If your use case requires plotting one signal against another during simulation (e.g., plotting y versus x, where both are time-varying signals), here are a few alternatives you can try:
  • Use the XY Graph Block: You can use the XY Graph block, which supports real-time plotting of one signal versus another during simulation. Simply connect your desired X-axis signal and Y-axis signal to this block. This block can be found under Simscape, then Utilities.
  • MATLAB Plot: Another option is to log both signals using the ‘To Workspace’ blocks and then use MATLAB to plot the results post-simulation with the following command:
plot(x_signal, y_signal)
  • Use Scope Block with Logging: You can use the standard Scope block to mark the signals for logging. After simulation, export the logged data to MATLAB and manually generate a custom XY plot.
I hope this helps.
  3 commentaires
Abhishek
Abhishek le 19 Juin 2025
Hi @Ajay Krishna Vasanthakumar, glad I could help. Can you please specify the problem properly?
Abhishek
Abhishek le 20 Juin 2025
Hi @Ajay Krishna Vasanthakumar, you can use the Selector block,by setting the index to 1, I was able to extract 'x[0]' and 'y[0]' (first element of the array signals, since Simulink uses 1-based indexing) and connect them to the XY Graph block. If you're plotting offline in MATLAB after simulation, you can use:
plot(x_signal(:,1), y_signal(:,1))
to get the same result.

Connectez-vous pour commenter.

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by