フィルターのクリア

How to get data from Simulink to Matlab function

2 ビュー (過去 30 日間)
Henri French
Henri French 2016 年 2 月 28 日
回答済み: Rohit Jain 2016 年 3 月 2 日
I have a Matlab function which calls my simulink model using sim() however am having trouble using the simout block to write to a variable within the function.
In order to use variables within the function as inputs to the simulink model I set options 'SrcWorkspace' to 'current'. I attempted to do the same with output using 'DstWorkspace' however I get an error:
Cannot create variable 'Sat_Theta' in workspace
Caused by:
Attempt to add "Sat_Theta" to a static workspace.
Is there a way to do this or is another block more suitable in this case to output the data?

回答 (1 件)

Rohit Jain
Rohit Jain 2016 年 3 月 2 日

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by