How to make brush ignore certain variables
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi there,
I am required to manually filter a large amount of data over multiple years. I would like to plot two variables at once, the "raw" data in red, then the "clean" data in blue. I would like to be able to modify the "clean" data with the brush tool without modifying the "raw" data (so that any changes I make are clearly visible). For example:
%imagine
x = 1:5;
y_raw = rand(5,1)
y_clean = y_raw
%notice the "clean" and "raw" data are the same initially,
%I would like to overlay them and use the brush tool to manually remove outliers
%from the "clean" variable, then save the new "clean" points.
plot(x,y_raw,'-or')
hold on
plot(x,y_clean,'-ob')
brush on
Afterwards, I would save the clean values with "save y_clean.mat y_clean"
The brush works on the "clean" blue variables if I only select one point at a time. However, I want to select many points at once by clicking and dragging the brush over the plot. Unfortuntely, this selects all the data and not just the top y_clean (blue) values. I have tried this:
a = plot(x,y_raw,'-or')
hold on
b = plot(x,y_clean,'-ob')
brush(a,'on')
but no luck. Thanks a ton!
-Devon
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Direct Search에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!