How can I introduce a "mouse pointer" cleaner?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello everyone,
I would like to include into my script a set of commands to visually control the success of filtering and reshaping data. Here there is an example of what I mean:

I would:
1- remove the 2 points on the top from this scatter plot (coming from 2 columns of a n rows * 23 columns matrix) using the mouse pointer
2- by doing this, removing the entire row of data corresponding to these 2 (now just removed) points.
Could you suggest me a way to set up this and a list of tools/resources that I may need?
Thank you in advance.
Alessandro
Answers (2)
Jan
on 17 May 2017
You can use dragrect to select the points by dragging a rectangle, or use the ButtonDownFcn of the line object to select a point. The latter will be more complicated, when the points belong to a single line object.
dragrect replies a rectangle and you can determing the indices of the points inside its borders, perhaps by inpolygon or manually. Then the detail "removing the entire row of data" depends on how your data are stored, but most likely something like this will help:
X = rand(5, 8);
index = [3,7];
X(index, :) = [];
Steven Lord
on 18 May 2017
0 votes
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!