how to display the results from simulink in a table
40 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i want to display my results from my circuit of a simulink model in table not in scope (graphical) ie: for example i want to display the result @ 1sec , and then the result @ 2sec , and then the result @ 3sec and so on
0 comentarios
Respuestas (4)
K E
el 17 de Mayo de 2012
If you do not need your table displayed in real time, you could complete the simulation, save the results to a mat file using the To File block, then load the mat file in Matlab and display a table, or write it out to an Excel file.
0 comentarios
Kaustubha Govind
el 18 de Mayo de 2012
You could set up a model execution event listener that is triggered every time a block's output is computed. This event listener can then update your table. See Listening for Method Execution Events.
0 comentarios
Bill Tubbs
el 5 de Abr. de 2022
Editada: Bill Tubbs
el 5 de Abr. de 2022
I also prefer working with tables and csv files rather than mat files so I wrote a script to convert a Simulink SimulationOutput object into a MATLAB table with appropriate column headings.
It works like this:
t = Ts*(0:nT)'; % sample times
sim_out = sim(sim_model, t(end));
% Convert results to table
sim_results = convert_simout_2_table(sim_out, t);
Source code here:
It only returns the simulation outputs that were sampled at the same times as the given time vector, so you have to make sure your model outputs are sampled at the correct times.
0 comentarios
Armel
el 29 de Sept. de 2022
Hello,
Could you please explain a little bit how to use your program? And what does he display?
Thanks!
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!