accessing variables in multiple .mlapp files - Matlab app designer

5 vues (au cours des 30 derniers jours)
Joseph Kutteh
Joseph Kutteh le 11 Juin 2021
Commenté : Adam Danz le 15 Juin 2021
hello,
i am wondering how to share variables between 2 matlab app designer (.mlapp) files. I have one file GUI2.mlapp and another file GUI4.mlapp. I would like to share a variable from GUI.mlapp to GUI4.mlapp. How am i able to do this?
matlab version: R2019B
Thank you!

Réponse acceptée

Adam Danz
Adam Danz le 11 Juin 2021
Although that page comprehensively explains the process, here's an answer that shows a step-by-step process of declaring app properties. You can use "public" properties.
  7 commentaires
Joseph Kutteh
Joseph Kutteh le 15 Juin 2021
i want to access the updated value of "name" in GUI4. "name" gets changed in GUI2 via a text field.
Adam Danz
Adam Danz le 15 Juin 2021
The line below with the leftward arrow is accessing the name propery of GUI2!
If this function is within GUI4, then use app.name since the app content pertains to GUI4.
%my second app called GUI4.mlapp
function startupFcn(app)
app2handle = GUI2
app2handle.name % <------------------------
end

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by