Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Accessing graphical mouse input before the input is finalized
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I would like to use imline to allow someone to do a regression visually. After plotting the data, I have a code that looks like the following:
p=imline;
fcn=makeConstrainToRectFcn('imline',get(gca,'XLim'),get(gca,'YLim'));
setPositionConstraintFcn(p,fcn);
Kids=get(p,'Children');
position = wait(p);
linepos=getPosition(p);
x=linepos(:,1);
y=linepos(:,2);
However, I can access x and y only after the user has confirmed his line by double-clicking on one end of the segment. I would like to be able to get x and y before the user finalizes his choice of points, so I can display a slope and intercept that vary as the user moves his end points.
Is there a way to do that?
Thanks in advance for your help!
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!