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!