home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 3.ddi / DEMOS.DI$ / SHOWWIND.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  695 b   |  27 lines

  1. % showwind script
  2. %
  3. %    Called by sigdemo1 if the signal processing toolbox is present
  4.  
  5. %    (c) Copyright 1984-93, by The MathWorks, Inc.
  6.  
  7.     figure
  8.  
  9.     axes('Position',[.15 .62 .8 .3]);
  10.     plot(t,window); 
  11.     title('Window function');
  12.     xlabel('time (seconds)');
  13.     grid;
  14.     ylabel('Window');
  15.  
  16.     axes('Position',[.15 .2 .8 .3]);
  17.     [W,omega]=freqz(window,1,512);
  18.     plot(omega/2/pi/T,20*log10(abs(W))); 
  19.     set(gca,'xlim',[0 1/(2*T)]);
  20.     xlabel('Frequency (Hz)');
  21.     ylabel('Magnitude (dB)');
  22.     grid;
  23.     windclose=uicontrol('Style','Pushbutton','Position',[.85 .02 .12 .08],...
  24.         'Units','normalized','Callback','close','String','Close');
  25.     
  26.