Getting output from GUI

조회 수: 17 (최근 30일)
Edward Sullen
Edward Sullen 2019년 2월 25일
I've created a GUI usind guide. I would to know how to output something from this GUI and immediately close it when a certain pushbutton in it is pushed.
  댓글 수: 2
Kevin Chng
Kevin Chng 2019년 2월 25일
what outputs are you looking? An image, A numeric variable, A figure? Where do you want to store the output?
Edward Sullen
Edward Sullen 2019년 2월 25일
I want to output two matrices that I calculate once the button is pressed. I want to store these matrices in variables in the workspace.

댓글을 달려면 로그인하십시오.

답변 (1개)

Kevin Chng
Kevin Chng 2019년 2월 25일
Assume you know how to pass those data between the function in guide.
In the callback of your button, if val1 is your matrix, you want assign it to the workspace and name this variable in the workspace as 'test1'.
assignin('base','test1',val)
  댓글 수: 2
Edward Sullen
Edward Sullen 2019년 2월 25일
Thanks for that, but I wanted to use varargout or assign another output variable. The GUI executes the OutputFcn before it executes any Callback, so I don’t have the chance to update the handles structure nor the varargout.
Alexandre Cucatti dos Santos
Alexandre Cucatti dos Santos 2019년 5월 27일
I had a similar problem, this video helped me a lot:
hope it helps you too :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by