Azzera filtri
Azzera filtri

structure usage in public function in App-designer

1 visualizzazione (ultimi 30 giorni)
Yu Li
Yu Li il 17 Dic 2018
Modificato: Yu Li il 17 Dic 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

Risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by