MATLAB: How to call the callback in GUI

active

I put this label into the figure that I created but how can I active it ? I want to load data , do you have any idea?
m = uimenu('Label','&File'); uimenu(m,'Label','Open','Callback','Mohammad');

Best Answer

  • if i understand correct, instead of 'Mohammad', you should write {@Mohammad} so that it becomes
    uimenu('Label','&File'); uimenu(m,'Label','Open','Callback',{@Mohammad});
    now you can write your function
    function varargout = Mohammad(varargin);
    that function can load the data for you