フィルターのクリア

how to obtain brushed data programaticly

3 ビュー (過去 30 日間)
Volkan Kandemir
Volkan Kandemir 2013 年 9 月 14 日
The same question is asked on the following link last year. ( http://www.mathworks.com/matlabcentral/answers/25488-brush-data-can-not-be-obtained )But no answers
h = brush;
set(h,'Enable','on','ActionPostCallback',@GetSelectedData);
what kind of a function should i write to retrieve 'GetSeletedData'?
  1 件のコメント
Gourish
Gourish 2013 年 9 月 24 日
編集済み: Gourish 2013 年 9 月 24 日
Can you use below code to get selected x and y data ?
figure; p = plot(1:10) h = brush hBrushLine = findall(gca,'tag','Brushing'); set(h,'Enable','on','ActionPostCallback',{@GetSelectedData,hBrushLine});
function GetSelectedData(h,e,g)
brushedData = get(g, {'Xdata','Ydata'}); brushedIdx = ~isnan(brushedData{1});
brushedXData = brushedData{1}(brushedIdx) brushedYData = brushedData{2}(brushedIdx)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by