Simulink doesn't export data when called by a matlab-function

2 ビュー (過去 30 日間)
AN
AN 2020 年 12 月 16 日
回答済み: Chaitanya Mallela 2020 年 12 月 21 日
Hello,
I have a timer function that runs a simulink model every five minutes. The model exports data into the Matlab-workspace.
When I run the Simulink-model from the command window with the sim('file.slx',time) - command, it works fine, however when I run the same command using the timer function, the Simulink-model doesn't export the calculated variables into the workspace. Are there any settings that are required for this to work?

回答 (1 件)

Chaitanya Mallela
Chaitanya Mallela 2020 年 12 月 21 日
To export the calculated variables into the workspace, consider taking the sim function inside the timer function as
out = sim('file.slx',time) ;
and return this output from timer function.

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by