set variable in App Designer
조회 수: 16 (최근 30일)
이전 댓글 표시
Hi i want to save the Value from a variable number of Field in a variable number of cache. I know hot to get the Value from a variable number of field but i dont know how to safe them.
app.Mat_Cache(v) = get(app.MatField(v),'Value');
채택된 답변
Cris LaPierre
2021년 4월 6일
Variables in an app are considered properties. See the Share Data Within App Designer Apps for how to create the property and then use it in your app. You'll also see that you do not need to use get or set anymore.
댓글 수: 4
Cris LaPierre
2021년 4월 8일
I stand corrected. When you capture multiple objects in a matrix, that variable is no longer a graphics object, and you cannot access the value that way. You'll have to use set and get. Sorry for the confusion.
app.Mat_Cache(v) = get(app.MatField(v),'Value');
% or
set(app.MatField(v),'Value',200+v);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File 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!