Use addNewPositionCallback to updates stored line coordinates in GUIDE
Mostra commenti meno recenti
Hello all,
I have read everything I could about the use of Callbacks in GUIDE, but I may use a little help from experienced users. I am trying to update a handles every time I resize an imline line, so I can use their coordinates later in my program. I cannot find the correct way to word it in Matlab. Here is an extract of the code:
handles.h = imline(gca,[-1 -1],[-2 2]);
id = addNewPositionCallback(handles.h,@hpos);
% Update handles structure
guidata(hObject, handles);
function hpos(h,handles)
% Display image info
set(handles.iminfo, 'String',{['It works!']});
I get the following error message: "Error while evaluating Figure WindowButtonMotionFcn.
Not enough input arguments."
Anybody could guide me in the right direction? Thanks in advance!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Build Interactive Tools in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!