Brush Data in GUI: Access in speparate function
7 ビュー (過去 30 日間)
古いコメントを表示
Hey everyone! I am struggeling to access data using the brushing tool in an separate function. I have read various contributions here but I didn't find a solution which suits me. What a basically want to do is 1. Brush certain data in a figure 2. Call a speparate function and access the data 3. Doing some computation on it. To keep it simple I have created this small script where my main problem occurs:
close all
clear all
clc
% Small test script
haxes = axes;
hLine = plot(haxes,1:10,1:10);
hbrush = brush(gcf);
% Call separate function if the selection has been done
set(hbrush,'ActionPostCallback',{@BushAction,hLine},'enable','on')
When the data using the brush tool is selected, the function
function BushAction(varargin)
% doing some cool stuff...
end
should be called, after the selection has been done. Using this code and setting a breakpoint in the separate function, 2 problems occur:
- The brush tool is still active and the previous selected data is not used.
- Probably due to problem 1, there is no way to find the selected data.
Can anyone help me with this issue?
Thanks in advance!
Felix
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!