Prev: Matlab code for BICM
Next: Array
From: crazee on 6 Jan 2010 14:19 Hello, My Matlab GUI has two axes, a single slider and few pushbuttons. I am using ginput(1) to get the coordinates of a click in any of the two axes. The two axes are tagged axes1 and axes2. To identify which axes was clicked, I am using following code: axis_handle = get(gca,'Tag'); axis_selected = str2double(axis_handle(end)) I hope this would work. Now I want the user to be able to use the slider or press a pushbutton (but not necessarily) before clicking on any of the axes to choose the coordinates. At present, after doing anything in the GUI, Matlab comes back to the function with ginput, hence waiting for the input. At this stage, if the user clicks outside the axes to use the slider or press a pushbutton, I believe ginput will simply extrapolate the coordinates of the last axes. Any suggestions on how to solve this? Thanks a lot. Gracee
|
Pages: 1 Prev: Matlab code for BICM Next: Array |