Command Window is not showing simulink results

9 ビュー (過去 30 日間)
Salaheldin Mahmoud
Salaheldin Mahmoud 2021 年 11 月 16 日
回答済み: Divyam 2024 年 9 月 6 日
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 Center および File ExchangeSimulink についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by