How to visualize a "timetable" variable in the Simulation Data Inspector without having to manually import it at the end of the simulation?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 6 de Ag. de 2023
Respondida: MathWorks Support Team
el 15 de Sept. de 2023
In MATLAB R2023a, I have created a "timetable" variable using a script. I would like to visualize this variable in the Simulation Data Inspector for my Simulink model, without having to import it manually each time I run the simulation.
How can I do that automatically?
Respuesta aceptada
MathWorks Support Team
el 6 de Ag. de 2023
In order to visualize a "timetable" object in the Simulation Data Inspector without having to manually import it, you can follow these steps:
1. Import the "timetable" variable from the MATLAB base workspace using a "Playback" block.
For more information on the "Playback" block, you can refer to the following link:
https://www.mathworks.com/help/releases/R2023a/simulink/slref/playback.html
2. Add a "Scope" block and connect the outputs of the "Playback" block.
For more information on the "Scope" block, you can refer to the following link:
https://www.mathworks.com/help/releases/R2023a/simulink/slref/scope.html
3. Double-click on the "Scope" block, then select
View > Configuration Properties > Logging
. Tick the option "Log data to workspace", then click "Apply" and "OK".
4. In the "Modelling" tab select
Model Settings > Data Import/Export
. Tick the option "Record logged workspace data in Simulation Data Inspector", then click "Apply" and "OK".
For more information on the "Record logged workspace data in Simulation Data Inspector", you can refer to the following link:
https://www.mathworks.com/help/releases/R2023a/simulink/gui/recordloggedworkspacedatainsimulationdatainspector.html
5. Run the simulation and open the Simulation Data Inspector from the "Simulation" tab. You should be able to visualize the data logged from the "Scope" block.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Load Signal Data for Simulation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!