필터 지우기
필터 지우기

Export Simulink parameters to .mat file

조회 수: 5 (최근 30일)
Mattijs Mientki
Mattijs Mientki 2018년 1월 26일
댓글: Mattijs Mientki 2018년 1월 29일
I am building a Simulink model, where a lot of parameters are shared using 'from' and 'go to' tags. Now we have a lot of outputs which I would like to save to a .mat file (after running the model). I have a working function Callback StopFcn function which can export variables which are in the workspace, but now it only works when i attach a 'to workspace' block to every output I want. Therefore the model looks quite busy. Is there a better way to export parameters? Maybe by naming signals? and exporting these? I was not succesful with this yet. And is there another way of sharing parameters between different blocks then using from and go to variables?

답변 (1개)

Carlos Vallejo
Carlos Vallejo 2018년 1월 26일
Hi. You can try to attach all or some of your parameters in a "bus Creator" and link it with a "to Workspace" block. back in Matlab you can save this bus into a .mat file.
  댓글 수: 1
Mattijs Mientki
Mattijs Mientki 2018년 1월 29일
Thank you for your answer. Unfortuantly then I have to substract the different columns from my output and rename to get back the old variable names. I would like to keep the variable names and export the variables without having 30 extra lines and 'to workspace' blocks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by