How to change the dashboard x axis
7 ビュー (過去 30 日間)
古いコメントを表示
I want the Dashboard x axis based on other signal at current time step. how can i do this
2 件のコメント
Walter Roberson
2025 年 6 月 11 日
For certainty: You are referring to https://www.mathworks.com/help/simulink/slref/dashboardscope.html ?
回答 (1 件)
Abhishek
2025 年 6 月 16 日
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 件のコメント
Abhishek
2025 年 6 月 19 日
Abhishek
2025 年 6 月 20 日
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!