How do I pass struct between functions in app designer
조회 수: 3 (최근 30일)
이전 댓글 표시
I'm trying to pass a structure from one function to another in app designer and I'm not sure what to do.
I tried app.(Variablename) = variable (where the variable is a 1x1 struct) but it pops up an error message saying unrecognized property for class 'orientation'
Thanks!
댓글 수: 0
채택된 답변
Mario Malic
2020년 11월 16일
Hello,
in the properties block, initialise your variable as struct
example = struct();
and refer to it within other functions as
app.example.field1 = 1;
댓글 수: 0
추가 답변 (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!