フィルターのクリア

Get final output after simulation run in Simulink from m-file

9 ビュー (過去 30 日間)
Ocean Blue
Ocean Blue 2014 年 7 月 13 日
回答済み: MiguelMauricio 2014 年 7 月 15 日
I want to get the final output of the Simulink [that is stored in Data Store Memory] through m-file .. whats the command here.
get_param just get attributes not the final output.
Appreciate your support.
Thank You

回答 (1 件)

MiguelMauricio
MiguelMauricio 2014 年 7 月 15 日
It depends how you have set the data output. In your simulink file go to: Simulation<Configuration Parameters<Data Import and Export and you can change the options. It also depends whether you are running the simulation from the Simulink interface (pressing Play) or with the sim command. In the latter case, this code can be useful
%Run simulink simulation
simOut=sim('simulink_file',t);
%%Data extraction
outVariable=get(simOut,'nameOfTheVariable');
y=outVariable.signals.values; %output

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by