# MATLAB: GUI ButtonDownFcn for clicking on axes

axesdouble clickguiMATLAB

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:
        axes(handles.axes3)        h(1)=imshow(thumb_1, [])        axes(handles.axes4)        h(2)=imshow(thumb_2, [])
set(h,'buttondownfcn','feval(getappdata(gcf,''bdfcnhandle''));');%
a1 = axes('Position', [0.1 0.1 0.4 0.4], 'ButtonDownFcn', @(s,e) run('s1'));a2 = axes('Position', [0.5 0.5 0.4 0.4], 'ButtonDownFcn', @(s,e) run('s2'));