Can I give input arguments while referencing a callback function?
古いコメントを表示
I'm new to object oriented MATLAB so bear with me.
I am plotting some data from my class S, as
Plot(s.X{i},s.Y{i},s.Data{i},...
set(gcf,'Name','Data1');
filepath = s.DirPath{1,i});
set(gca,'ButtonDownFcn',@mycallback);
Now I want to give this 'filepath' as one of the input argument for my callback function. But when I try to use filepath, it doesn't recognize it.
I also tried
set(gcf,'Tag',s.DirPath{1,i});
set(gca,'ButtonDownFcn',@mycallback);
and
get('Tag');
within my callback function.
Any help?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!