MATLAB Answers

Is it possible to change the value of a global variable in app designer?

조회 수: 14(최근 30일)
Aurélie B
Aurélie B 2021년 3월 15일
댓글: Aurélie B 2021년 3월 18일
Hello,
I initialized a matrix as a global variable (in the properties of the app) and I am now trying to fill it thanks to function called in differents callbacks. Is it possible to keep in memory the matrix filled with a previous callback and use it later with another callback.
I don't know if it is possible to create a variable in the properties that keep in memory the matrix filled, and then call it in another part of my code?
Thank you

채택된 답변

Dennis
Dennis 2021년 3월 15일
Yes, you can use one matrix for several callbacks and it will keep its values. It will be stored as app property, so you need to use app. .
%in the property section:
mymatrix
%in your callback
app.mymatrix
  댓글 수: 3

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by