How to get brushed data into a variable programmatically?

조회 수: 3 (최근 30일)
HT
HT 2017년 4월 17일
댓글: Davide Mastrodicasa 2020년 2월 13일
I have a 3D plot. I want to select a region from it and discard the rest x,y,z points. I want to use the brush tool to select the points that i need and save them in a variable using commands. I have seen some posts regarding this issue but still the problem persists. Any help is appreciated. Thanks!

답변 (1개)

Swathik Kurella Janardhan
Swathik Kurella Janardhan 2017년 4월 20일
You can use the 'BrushData' property to get the data into a variable as mentioned in the answers link
You can get only x,y points with 'BrushData' and you can use 'find' to find the indices of the brush data.
>> z = peaks(25);
>> figure
>> h = mesh(z);
>> data = h.BrushData;
>> indices = find(data);
  댓글 수: 2
HT
HT 2017년 4월 21일
Is there a way to get z points as well? Because i have a 3D plot.
Davide Mastrodicasa
Davide Mastrodicasa 2020년 2월 13일
I'm having troubles with the same problem. I know the question is really old, but, did you find any solution?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by