필터 지우기
필터 지우기

accessing variables in multiple .mlapp files - Matlab app designer

조회 수: 12 (최근 30일)
Joseph Kutteh
Joseph Kutteh 2021년 6월 11일
댓글: Adam Danz 2021년 6월 15일
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!

채택된 답변

Adam Danz
Adam Danz 2021년 6월 11일
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
Joseph Kutteh
Joseph Kutteh 2021년 6월 15일
i want to access the updated value of "name" in GUI4. "name" gets changed in GUI2 via a text field.
Adam Danz
Adam Danz 2021년 6월 15일
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

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by