필터 지우기
필터 지우기

structure usage in public function in App-designer

조회 수: 1 (최근 30일)
Yu Li
Yu Li 2018년 12월 17일
편집: Yu Li 2018년 12월 17일
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

답변 (0개)

카테고리

Help CenterFile 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!

Translated by