Can I give input arguments while referencing a callback function?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!