How to add a crosshair to matlab Figures?

i have a GUI which simply opens an image in a new fogure window. i would like to add a buttom that when pushing, add a crosshair or data cursor that takes it's position (coordinate) from two text box (X and Y text box). something inverse to ginput function which return the X and Y. many thanks

Answers (1)

per isakson
per isakson on 21 Nov 2013
Edited: per isakson on 21 Nov 2013

1 Comment

thank you very much for your guide. but the point is i want to have a crosshair that point to the place (coordinate) that i have enter in a text box. here is the code my code:
% opening the image by pushing button
FileName=uigetfile(*.jpg);
figure
imshow(Filename);
%calling the edit text boxes for entering the coordinates
%function edit1_Callback(hObject, eventdata, handles)
%making a oush button
now i want when i push another button a crosshair jumps to the desired coordinate. thank you very much

Sign in to comment.

Categories

Asked:

on 21 Nov 2013

Commented:

on 24 Nov 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!