how to use a variable returned from one callback function in an other callback funtion in GUI??
조회 수: 1 (최근 30일)
이전 댓글 표시
I have two functions called sum1_Callback and disp_Callback
function c=sum1_Callback(hObject, eventdata, handles) c= 2*2;
function disp_Callback(hObject, eventdata, handles,c) disp(c)
In sum_Callback, I have a variable c which I want to use in disp_Callback, but I get an error telling the variable is undefined.
What should be done??
Thanks in advance for the help.
댓글 수: 0
답변 (1개)
Walter Roberson
2013년 9월 13일
There are no callbacks that take eventdata as the second parameter and return values. The only callbacks that return values are the ones that are acting as filters, such as a constraint function programmed to ensure that a rectangle selection retains a particular proportion.
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!