フィルターのクリア

sim command in Matlab and ToWorkspace in SIMULINK dont work togheter?

3 ビュー (過去 30 日間)
Benjamin Pommer
Benjamin Pommer 2022 年 9 月 5 日
回答済み: Paul 2022 年 9 月 5 日
Hi matlab commuinity,
I want to run a simulation through the command sim('...') in a matlab file and extract the input and output data through a ToWorkspace block. It seems like that that does not work out. Why is that?
Best regards

採用された回答

Paul
Paul 2022 年 9 月 5 日
Hi Benjamin,
Specify an ouput argument for the sim command, like so:
ouputdata = sim('mymodel');
All of the ToWorkspace blocks (and other stuff as well) will be in outputdata, which can be accesses via dot indexing among other options. Start with the doc page for sim; it will tell you exactly the type of object that output data instantiates, and the doc page for that object can be further explored.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by