Command Window is not showing simulink results

9 visualizzazioni (ultimi 30 giorni)
Salaheldin Mahmoud
Salaheldin Mahmoud il 16 Nov 2021
Risposto: Divyam il 6 Set 2024
hello there,
I am using Matlab 2018a also, i tried matlab 2021a...
I am having a problem with Command Window as it's not showing the results of my Simulink model.
I used to test the codes in my simulink in step by step mannar, but i can't view the results shown in the Command Window.
Note: I am not using " ; " in these code lines.
Also, when i tried to test the Command Window with a Matlab file which contains 3 lines of code, and when i ran it, it worked fine and the results shown already in the command window.
Thanks in advance,

Risposte (1)

Divyam
Divyam il 6 Set 2024
Simulink does not show the output of the simulated models by default in the command window since the outputs of a Simulink model are stored as "Simulink.SimulationOutput" objects.
To leverage the command window, you can log the data from the Simulink model to workspace using the "To workspace" Simulink block. Then you can utilize the MATLAB command window to display the model outputs by typing the variable names in the command window.
For more information regarding the "To workspace" block, refer to this documentation: https://www.mathworks.com/help/simulink/slref/toworkspace.html

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by