Callback function in guide
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello guys, I made a GUI by making use of 'guide'. My GUI make cell array named 'shapes' when pushbutton51 is pressed, Then the 'newshapecreated' is triggered(I made this as a callback function) And this callback function should process with the 'shape'. But it can't read the 'shape'. The matlab says 'Input argument "handles" is undefined.'
What is the problem with my code?
*function pushbutton51_Callback(hObject, eventdata, handles)
shapes = {};
handles.shapes = shapes;
guidata(hObject, handles);
% below is callback function newshapecreated;
function newshapecreated(hObject, eventdata, handles)
shapes=handles.shapes;*
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 6월 9일
The second function should be
function newshapecreated(hObject, eventdata, handles)
shapes=handles.shapes
댓글 수: 7
참고 항목
카테고리
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!