Simple Examples How Create gui-applications

by

 

08 Aug 2005 (Updated )

Another examples how create gui-interface (with nested functions without Guide).

gui09
function gui09

  figure;
  cmenu = uicontextmenu;
  [X,Y,Z]=peaks;
  surf(X,Y,Z,'UIContextMenu',cmenu)
  uimenu(cmenu, 'Label', 'Mesh', 'Callback', {@NotImplemented, 'Mesh'});
  uimenu(cmenu, 'Label', 'Surf', 'Callback', {@NotImplemented, 'Surf'});
  uimenu(cmenu, 'Label', 'Surfl', 'Callback', {@NotImplemented, 'Surfl'});


function NotImplemented(h, eventdata, op)

  msgbox(['Operation ' op ' is not implemented'], ...
    'Warning', 'warn', 'modal')    
  

Contact us