How can I introduce a "mouse pointer" cleaner?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
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
0 个评论
回答(2 个)
Jan
2017-5-17
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, :) = [];
0 个评论
Steven Lord
2017-5-18
0 个投票
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!