How to extract brushed data from a surf plot in the form of a matrix?

조회 수: 1 (최근 30일)
J M
J M 2017년 2월 15일
Hi all,
I have 2736x1920 matrix from which I create a surf plot, I then brush some values from the plot and extract them in the following manner:
Handle = surf(Z);
h = brush;
set(h,'Enable','on');
brushed = logical(get(Handle, 'BrushData'));
'brushed' is a 2736x1920 logical array. I want to extract all the brushed values from 'Z' into a new matrix. but when I do:
brushed_val = Z(brushed);
I get a column vector.
Any ideas how can I get a submatrix of 'Z' that contains the 'trues' that are given in 'brushed'?
thanks.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by