Borrar filtros
Borrar filtros

Sharing data among AppDesigner, Functions and Simulink Model.

1 visualización (últimos 30 días)
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 comentario
Vitor Henrique Madureira Biajo
Vitor Henrique Madureira Biajo el 24 de En. de 2021
Editada: Vitor Henrique Madureira Biajo el 27 de En. de 2021
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.

Iniciar sesión para comentar.

Respuesta aceptada

Sai Veeramachaneni
Sai Veeramachaneni el 27 de En. de 2021
Editada: Sai Veeramachaneni el 27 de En. de 2021
Hi,
You can use assignin function to assign variables in base workspace, also try methods suggested here.
Hope it helps.
  1 comentario
Vitor Henrique Madureira Biajo
Vitor Henrique Madureira Biajo el 29 de En. de 2021
Editada: Vitor Henrique Madureira Biajo el 29 de En. de 2021
Thank you for the answer. I ended up assigning the variables in base workspace.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by