필터 지우기
필터 지우기

Output of callback function

조회 수: 3 (최근 30일)
Ouael Chkoundali
Ouael Chkoundali 2019년 3월 13일
댓글: Ouael Chkoundali 2019년 3월 13일
Hi,
on a figure I have 2 axes and a pushbutton. For the pushbutton I used this code to define its callback:
set(button,'Callback',@(hObject,eventdata) button_function(ax1,matrix,ax2) );
The button_function allows to select a part of the input matrix on ax1 and plot it on ax2. And the output of this function is the new matrix (the selected part of the input matrix). To save this new matrix I used this:
new_matrix = set(button,'Callback',@(hObject,eventdata) button_function(ax1,matrix,ax2) );
But the value of new_matrix is [ ] . How can I get it right?
Thanks for your help.
  댓글 수: 9
Guillaume
Guillaume 2019년 3월 13일
편집: Guillaume 2019년 3월 13일
So what should happen if the user press on pushbutton_3D_Interpretation a second time?
Ouael Chkoundali
Ouael Chkoundali 2019년 3월 13일
You have right, it will open a second figure. And I loose the matrix I used in the first figure because it will be updated. It's beeing very complecated. Let's assume that the first figure will be closed if the user press the button a second time. How should I do it?

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

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by