%带有右键菜单的GUI figure('Menubar','none'); h = uicontextmenu; uimenu(h,'Label','A'); uimenu(h,'Label','B'); set(gcf,'Uicontextmenu',h); %获得当前时间 datestr(now) 右键菜单 function varargout = GUI17(varargin) % GUI17 MATLAB code for GUI17.fig % GUI17, by itself, cr…