Command Window is not showing simulink results

10 次查看(过去 30 天)
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,

回答(1 个)

Divyam
Divyam 2024-9-6
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

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by