Borrar filtros
Borrar filtros

structure usage in public function in App-designer

1 visualización (últimos 30 días)
Yu Li
Yu Li el 17 de Dic. de 2018
Editada: Yu Li el 17 de Dic. de 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

Respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by