Hi all, I've got 2 axes in my GUI, and I want to be able to launch a different .m file when the user clicks either axes.
Currently I can launch a function, but I'm unable to differentiate between the different axes, and I'd rather directly run a .m script if possible.
I currently have:
setappdata(gcf,'bdfcnhandle',load_stuff);
axes(handles.axes3) h(1)=imshow(thumb_1, []) axes(handles.axes4) h(2)=imshow(thumb_2, [])
set(h,'buttondownfcn','feval(getappdata(gcf,''bdfcnhandle''));');%
function load_stuff(hObject, eventdata, handles) X=100;
Also using the code above, I seem to be unable to access the handles structure in my "load_stuff" function!
Can anyone help my plight?
Thanks, Jim
Best Answer