how to deselect a brushed data programatically? Without clicking on the figure
10 次查看(过去 30 天)
显示 更早的评论
how to programmatically deselect brush data without clicking on the figure? Maybe using set function
thank you
0 个评论
回答(1 个)
Maadhav Akula
2021-3-10
You can set the Brushed Data to 0 at the respective indices to deselect the brushed data. Please check the example below to better understand this:
%% Plot a surface
z = peaks(25);
figure
h = mesh(z);
brush on
%% Now manually brush the data on the figure using mouse
brush off
%% Capture the brushed elements and set them to 0
data = h.BrushData;
indices = find(data);
data(indices) = 0;
h.BrushData = data;
% Check the figure
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Control Design 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!