Prev: HorzResolution and VertResolution
Next: LEVMAR with MEX
From: Stefan Heinen on 22 May 2010 05:18 Hey everyone, I'm trying to sellect some points on a graph with the ginput function. Is there any way to select only the points on the graph. Because you can easely click wrong an than you wil have a point just near the curve and not on the graph. Thx, Stefan
From: John D'Errico on 22 May 2010 08:20 "Stefan Heinen" <s.g.h.heinen(a)live.com> wrote in message <ht87gd$bgg$1(a)fred.mathworks.com>... > Hey everyone, > > I'm trying to sellect some points on a graph with the ginput function. > Is there any way to select only the points on the graph. Because you can easely click wrong an than you wil have a point just near the curve and not on the graph. > Surely this tells you that ginput is not the correct way to do such selection, or that you need to do something extra. You might find selectdata handy. http://www.mathworks.com/matlabcentral/fileexchange/13857 John
From: Stefan Heinen on 22 May 2010 09:21 thx, but I already figured out that you could do it like this: datacursormode on dcm_obj = datacursormode(fig1); for i = 1:3 pause dcm_obj = datacursormode(fig1); set(dcm_obj,'DisplayStyle','window'); cursor_info = getCursorInfo(dcm_obj); text(... ,'FontSize',7) plot(cursor_info.Position(1),cursor_info.Position(2),'*r') end datacursormode off the data cursor lies always on the graph!
|
Pages: 1 Prev: HorzResolution and VertResolution Next: LEVMAR with MEX |