Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

selecting value using ginput

Asked by Lalit Patil on 3 Jan 2013
 data = dlmread('value.txt');
 plot3(data(:,1),data(:,2),data(:,3),'r.')
 axis off 
 [x,y,z] = ginput(2)

ginput gives value in command window. I want that value above cursor on image when i select point. So, how to do..?

0 Comments

Lalit Patil

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 3 Jan 2013

5 Comments

Image Analyst on 3 Jan 2013

Lalit, impixelinfo most certainly DOES work with color images. I know because I do it all the time. You case here is totally different. You actually don't have an image at all, like you did in your other question. Here you have a rendering of a plot of a few points in 3D - it's not a grayscale or color image in the sense that it's a solid 2D array of numbers. Do you understand the difference?

Lalit Patil on 4 Jan 2013

yes, datacursormode() works.. Now, i want to display that value in command window which i select on image..

Walter Roberson on 4 Jan 2013

Add an axes or lineseries ButtonDownFcn callback (if you add it to axes, be sure to set() 'Hittest', 'off' on all the lines in the axes)

Walter Roberson

Contact us