So I started a GUI using GUIDE. i want to be able to click on a point in a figure created by trisurf in axes1.
i added a 'button down' function using the GUIDE interface. but when i add code there as follows:
then i have 2 issues: (1) if the trisurf hasn't been initialised via button click i get the error ??? Input argument "handles" is undefined.
Error in ==> GUI>axes1_ButtonDownFcn at 228 set(handles.text4,'string', num2str(x(1,1)));
??? Error while evaluating axes ButtonDownFcn
(2) once the trisurf function is initiated (via a pushbutton), the buttondownfcn no longer works at all
So, help? not even sure the CurrentPoint is the right comand, but the whole thing is a bit hinky.
p.s. sorry i have used matlab for ages, just never done GUI's - i'm working with users who can't handle doing things manually...