File Exchange

image thumbnail

lasso.m

version 1.0.0.0 (1.59 KB) by Thomas Rutten
Enables the selection/encircling of (clusters of) events in a scatter plot by hand.

8 Downloads

Updated 30 Sep 2003

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

[selx,sely,indexnr]=lasso(x,y);

Input: x,y - a set of points in 2 column vectors.
Output: selx,sely,indexnr - a set of selected points in 3 column vectors

Note: After the scatter plot is given, selection by mouse is started after any key press. This is done to be able to ZOOM or CHANGE AXES etc. in the representation before selection by mouse. Encircling is done by pressing subsequently the LEFT button mouse at the requested positions in a scatter plot. Closing the loop is done by a RIGHT button press.

Cite As

Thomas Rutten (2020). lasso.m (https://www.mathworks.com/matlabcentral/fileexchange/3991-lasso-m), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Cao

Cao

Exellent!

Avigdor Namir

c. s.

Dear Thomas: "lasso" is a useful software indeed. I think you could improve it with a little effort, giving the supplementary result POS where POS is the selected point POSITION index (row number) in the input [x,y] two columns matrix.
Regards
claudio

c. s.

Useful and clever soft.

Juw Ma

Updates

1.0.0.0

On request, a third output column representing the index number (position in [x,y]) of selected events, is added.

On request, a third output column representing the index number (position in [x,y]) of selected events, is added.

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux