Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Accessing graphical mouse input before the input is finalized
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!