Sharing data among AppDesigner, Functions and Simulink Model.

조회 수: 1 (최근 30일)
Hi,
I have been having an issue using AppDesigner, which does call a script .m file, but the variables do not load into the base workspace (which I use in my Simulink model). I have already tried to change the .m file to a function assigning the variables globally. However, they are still not shared with my Simulink application.
How should I design "the system architecture" to use the AppDesigner which calls a .m file and consequently a Simulink model? How can the data be shared among these three applications?
Thank you.
  댓글 수: 1
Vitor Henrique Madureira Biajo
Vitor Henrique Madureira Biajo 2021년 1월 24일
편집: Vitor Henrique Madureira Biajo 2021년 1월 27일
I have just found out that I can use the assignin function. However, I do not think this is an elegant solution as I will have to write a lot of lines just assigning the variables in base workspace.

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

채택된 답변

Sai Veeramachaneni
Sai Veeramachaneni 2021년 1월 27일
편집: Sai Veeramachaneni 2021년 1월 27일
Hi,
You can use assignin function to assign variables in base workspace, also try methods suggested here.
Hope it helps.
  댓글 수: 1
Vitor Henrique Madureira Biajo
Vitor Henrique Madureira Biajo 2021년 1월 29일
편집: Vitor Henrique Madureira Biajo 2021년 1월 29일
Thank you for the answer. I ended up assigning the variables in base workspace.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by