Effacer les filtres
Effacer les filtres

structure usage in public function in App-designer

1 vue (au cours des 30 derniers jours)
Yu Li
Yu Li le 17 Déc 2018
Modifié(e) : Yu Li le 17 Déc 2018
I met a problem while assigning a variable to structure in App-designer:
methods (Access = public)
function plottest(app,WorkingDir)
tmp=3;
result.a=tmp;
end
end
but Matlab reported error: The expression to the left of the equals sign is not a valid target for an assignment.
however, when I revise it like this:
methods (Access = public)
function plottest(app,WorkingDir)
tmp=3;
result=tmp;
end
end
the problem does not exist anymore.
The reason I want to use structure is that, I have lots of variables that need to save at the end of this function, saving them one by one works but not as well as saving them into one structure.
just want know what is the problem here. is there anyway to resolve it?
Thanks!
Yu

Réponses (0)

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!

Translated by