How do I pass struct between functions in app designer
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
William Pang
le 16 Nov 2020
Réponse apportée : Mario Malic
le 16 Nov 2020
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 commentaires
Réponse acceptée
Mario Malic
le 16 Nov 2020
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!