function simmenu
%
%  Name: simmenu.m
% 
%  Usage: simmenu
% 
%  Description:
%     Initializes test simulation menus
%

%  Version SWD970916
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This matlab source code was originally     %
% developed as part of "DIAMOND" at          %
% Los Alamos National Laboratory. It may     %
% be copied, modified, and distributed in    %
% any form, provided:                        %
%  a) This notice accompanies the files and  %
%     appears near the top of all source     %
%     code files.                            %
%  b) No payment or commercial services are  %
%     received in exchange for the code.     %
%                                            %
% Original copyright is reserved by the      %
% Regents of the University of California,   %
% in addition to Scott W. Doebling, Phillip  %
% J. Cornwell, Erik G. Straser, and Charles  %
% R. Farrar.                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%

global HANDLES sys

%=============================================
% Load/Save menu
%=============================================
HANDLES.hmmenu{18}(1)=uimenu(HANDLES.hfigdmnd,'Label','Load/Save','enable','on');  
uimenu(HANDLES.hmmenu{18}(1),'Label','Load System Model',...
   'Callback','simloadsys');             
uimenu(HANDLES.hmmenu{18}(1),'Label','Save System Model',...
   'Callback','simsavesys');             

%   'errordlg(''not programmed yet'')')

%=============================================
% System menu
%=============================================
HANDLES.hmmenu{19}(1)=uimenu(HANDLES.hfigdmnd,'Label','System','enable','on');  
uimenu(HANDLES.hmmenu{19}(1),'Label','Define/Modify','Callback','simsyshand')

%
% Simulation menu
%

HANDLES.hmmenu{20}(1) = uimenu(HANDLES.hfigdmnd,'Label','Simulation','enable','off');  
   HANDLES.hmmenu{20}(2)= uimenu(HANDLES.hmmenu{20}(1),'label','Input Signal');
 	uimenu(HANDLES.hmmenu{20}(2),'label','Random',...
      'callback','siminphand(1),sys.input.n=1;')
	uimenu(HANDLES.hmmenu{20}(2),'label','Harmonic',...
      'callback','siminphand(2),sys.input.n=2;')
   uimenu(HANDLES.hmmenu{20}(2),'label','Impulse',...
      'callback','siminphand(3),sys.input.n=3;')
   uimenu(HANDLES.hmmenu{20}(2),'label','User defined',...
      'callback','siminphand(4),sys.input.n=4;')
	  
   HANDLES.hmmenu{20}(3)=uimenu(HANDLES.hmmenu{20}(1),'label','Windowing','enable','off');
   uimenu(HANDLES.hmmenu{20}(3),'label','Hanning',...
      'callback','simwinhand(1),sys.win.n=1;,sys.win.flag=0;')
	uimenu(HANDLES.hmmenu{20}(3),'label','Exponential',...
      'callback','simwinhand(2),sys.win.n=2;,sys.win.flag=0;')
   uimenu(HANDLES.hmmenu{20}(3),'label','Rectangular',...
      'callback','simwinhand(3),sys.win.n=3;,sys.win.flag=0;')
   uimenu(HANDLES.hmmenu{20}(3),'label','User defined',...
      'callback','simwinhand(4),sys.win.n=4;,sys.win.flag=0;')
   
   HANDLES.hmmenu{20}(4)=uimenu(HANDLES.hmmenu{20}(1),...
      'label','Run','enable','off',...
      'callback','simrunhand');


HANDLES.hmmenu{21}(1) = uimenu(HANDLES.hfigdmnd,...
   'Label','Post Processing','enable','off');  
HANDLES.hmmenu{21}(2)=uimenu(HANDLES.hmmenu{21}(1),'label','Window Results',...
   'callback','');
uimenu(HANDLES.hmmenu{21}(2),'label','Hanning',...
      'callback','simwinhand(1),sys.win.n=1;,sys.win.flag=1;')
	uimenu(HANDLES.hmmenu{21}(2),'label','Exponential',...
      'callback','simwinhand(2),sys.win.n=2;,sys.win.flag=1;')
   uimenu(HANDLES.hmmenu{21}(2),'label','Rectangular',...
      'callback','simwinhand(3),sys.win.n=3;,sys.win.flag=1;')
   uimenu(HANDLES.hmmenu{21}(2),'label','User defined',...
      'callback','simwinhand(4),sys.win.n=4;,sys.win.flag=1;')



uimenu(HANDLES.hmmenu{21}(1),'label','Plot Results',...
   'callback','simplotdata')
HANDLES.hmmenu{21}(3)=uimenu(HANDLES.hmmenu{21}(1),...
   'label','Output Results to Workspace',...
   'callback','simouthand','enable','off');


  