user interface - In a MATLAB GUI, extract coordinates by clicking inside a plot and display it -


I am very new to MATLAB, I have looked everywhere to solve this problem:

For example, use this GUI:

How can I do this, by clicking somewhere inside the plot, in the text box x coordinates? function axes1buttonDownFcn (hObject, eventdata, handle) [xy] =

(GCA, 'CurrentPoint') , Set (handle.edit1, 'string', number 2:25 (x)); Guadata (Hobbect, Handle);

Edit: Oh, say the question wrong. I pushed my original answer to the bottom of the post. It can still be useful here:

  function axes1buttonDownFcn (hObject, eventdata, handle) [x y] = eventdata; Set (handle.edit1, 'string', number 2:25 (x)); Guadata (Hobbect, Handle);   

Note, I have seen examples where event data just does not work. If you try to use it and it is empty, then let me know and I will try to run it using the custom Dataxersload Tooltip callback function, which is quite complex, but possible

Original:

  on the Datacompasses   

See the page for additional information. I've done a lot of work with custom data cursor mode functions and plot-click things, so if you have more obvious questions, feel free to ask.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -