Export GUI structures to Matlab workspace

Hello,
I have created a GUI that processes video information. I want to export the processed data to the MATLAB workspace but I cannot get the Outputfnc to send out the structures. Ideally I would like to have a button to press to send specific data in the GUI structures to the MATLAB workspace. That way I can analyze the data outside of the GUI. Is there a straight forward way to do this?

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 22일

0 개 추천

Whatever process you do in GUI programming is likely happened in the callback function. The processed data is in the function workspace of that function. To make that data available in MATLAB base workspace, you can choose any one of the following:
  1. save the data into a .mat file then you can load in base workspace
  2. use assignin('base',...) function, see help assignin
  3. declare the output variable as global, see help global

댓글 수: 1

Thurston Herricks
Thurston Herricks 2011년 10월 22일
Thanks! The assignin was exactly what I was looking for!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by