user interface - Property of PUSH-BUTTON in MATLAB GUI -
in gui's can press same pushbutton twice/thrice/multiple times? i've designed gui pushbutton, works once @ first when pressed that.
function flip_h_callback(hobject, eventdata, handles) = getimage(handles.axes1); hflip = flipdim(a,2); axes(handles.axes1); imshow(hflip); guidata(hobject, handles);
above code flip
. flips image horizontally. when run , if press pushbutton image gets flipped again if press same button not! thought second time if press call flip_h_callback
again not that. why so? can that?
it call callback whenever press push button.
your callback not correct.
you never capture output flipdim
, whenever callback executes flips original matrix , show result got on first flip.
instead use:
a= flipdim(a,2);
also, better have copy of initial image.
Comments
Post a Comment