필터 지우기
필터 지우기

In app designer, How to use global variables from m file?

조회 수: 1 (최근 30일)
Jae Heon Kim
Jae Heon Kim 2020년 1월 16일
댓글: yan m 2022년 2월 1일
As I say, I made a "m file" that contains global variables for using in various kinds of windows(I mean apps or functions).
And also made another "m file" for function that read a file then store data in global variables which I described.
I can call the file read function but I don't know how to call the global variables in app designer.
Anybody know how to call them?

답변 (1개)

Jae Heon Kim
Jae Heon Kim 2020년 1월 16일
Nevermind :D
I missed some small things but I couldn't see them.
Sorry guys! :)
For anybody who have same problem like me:
Function functionName(app, event)
MfileFilledWithVariables;
TypetheNameofVariable; <- You can arrange it;
end
  댓글 수: 2
Matthias De Lepeleer
Matthias De Lepeleer 2021년 5월 7일
Facing the same problem here, what do you mean by you can arrange it?
I declared global variables in my m-file (script) and want to display those variables in the app desiger. I tried several ways. None is working.
% Run script (m-file)
m-filename
% Call global from m-file ('switch_ui' is the global var)
global switch_ui;
app.SwitchesEditField.Value = switch_ui;
yan m
yan m 2022년 2월 1일
Hello i want to do the opposite of this, call my
AppDesignerVariable into a .m file that will start by :
Var = AppDesignerVariable;

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

카테고리

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