function dfd(fcn)

if nargin == 0
   fcn = 'makeGUI';
end

switch fcn
   
case 'makeGUI'
   
     % ===Create main figure==========================
 
     fig = figure('Position',centerfig(660,630),...
      'Resize','on',...
      'NumberTitle','off',...
      'Name','Digital Filter Design',...
      'Interruptible','off',...
      'Menubar','none',...
      'Color',get(0,'DefaultUIControlBackgroundColor'));
     
   %===A menu======================================
f = uimenu(gcf,'Label','FIR Design');
      uimenu(f,'Label','by Rectangular window','Callback','firrec');
      uimenu(f,'Label','by kaiser window','Callback','firkai');
      uimenu(f,'Label','by Blackman window','Callback','firbla');
      uimenu(f,'Label','by hanning window','Callback','firhan');
m = uimenu(gcf,'Label','IIR Design');
      uimenu(m,'Label','Elliptic','Callback','IIRell');
      uimenu(m,'Label','Chebyshev','Callback','IIRch');
      uimenu(m,'Label','Butterworth lowpass ','Callback','IIRblp');
      uimenu(m,'Label','Butterworth highpass ','Callback','IIRbhp');
      uimenu(m,'Label','Butterworth bandpass ','Callback','IIRbu');
      uimenu(m,'Label','Impulse Invariance Method','Callback','IIRimpv');
      uimenu(m,'Label','Bilinear Transformation Method','Callback','IIRbil');
e = uimenu(gcf,'Label','End Program');
      uimenu(e,'Label','Quit','Callback','close',...
            'Accelerator','C');

      %            'Separator','on','Accelerator','Q');
end

%===A utility to center the window on the screen============
function pos = centerfig(width,height)
screen_s = get(0,'ScreenSize'); % Find the screen size in pixels
pos = [screen_s(3)/2 - width/2, screen_s(4)/2 - height/2, width, height];


