MATLAB Answers

How to using addNewPositionCallback to refresh my handles.else value???

1 view (last 30 days)
Lai man
Lai man on 15 Nov 2018
Edited: Lai man on 15 Nov 2018
function create_rect_Callback(hObject, eventdata, handles)
handles.r_c = handles.r_c + 1; %rect count
handles.rts(handles.r_c).rect = imrect; %creat rectangle
handles.rts(handles.r_c).tm = 0; %I want to refresh this value
addNewPositionCallback(handles.rts(handles.r_c).rect,@(p) Rectupdate(handles, hObject));
function Rectupdate(handles, hObject)
handles.rts(handles.r_c).tm = 1;
But seem handles.rts(handles.r_c).tm value is not change to 1 when I drag my rectangle.....


Sign in to comment.

Answers (0)

Sign in to answer this question.


Translated by