spec_pr.m

来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 89 行

M
89
字号
%
% Callback function for Property button of Spectra analysis window
% Author : Minkyu Lee
% Date : 13-Mar-1995
% Modified by Karthik May 27 1997
% Modified by D. G. Childers


PV=[2 187 290 220];
s2 = 'Spectral Estimation Properties';
% Open analysis window
while exist('spec_pr_win_h')==1
   try1 = 'get(spec_pr_win_h,''position'');';
   eval(try1,catch2);
   if check ==0
      clear spec_pr_win_h;
      check = 1;
      break;
   end
   s1 = get(spec_pr_win_h,'Name');
   if ~strcmp(s1,s2)
      clear spec_pr_win_h;
      break;
   end
   figure(spec_pr_win_h);
   break;
end;

if exist('spec_pr_win_h')~=1;

   spec_pr_win_h=figure('Position',PV,...
      'Resize','on',...
      'Numbertitle','off',...
      'color',BACK_COLOR,...
      'Name',s2);

   spec_pr_txt3_fl_h=uicontrol('Style','pushbutton',...
      'Position',[10 170 130 30],...
      'String','Frame length');

   spec_pr_txt4_fl_h=uicontrol('Style','edit',...
      'Position',[150 175 40 20],...
      'String',spec_frame_len,...
      'Callback','spec_pr_fl_ed');

   spec_pr_fl_h=uicontrol('Style','slider',...
      'Position',[190 175 90 20],...
      'Max',12,...
      'Min',4,...
      'Value', log(spec_frame_len)/log(2),...
      'Callback','spec_pr_fl_sl');

   spec_mu_pr_txt1_np_h=uicontrol('Style','pushbutton',...
      'Position',[10 120 130 30],...
      'String','# poles: music and esprit');
   
   spec_mu_pr_txt2_np_h=uicontrol('Style','edit',...
      'Position',[150 125 40 20],...
      'String', num_poles,...
      'Callback','mu_pr_np_ed');
   
   spec_mu_pr_np_h=uicontrol('Style','slider',...
      'Position',[190 125 90 20],...
      'Max',max_np,...
      'Min',1,...
      'Value', num_poles,...
      'Callback','mu_pr_np_sl');

   spec_pr_swin_h=uicontrol('Style','popup',...
      'Position',[10 70 130 30],...
      'String','Hamming|Hanning|Kaiser|Triangular|Bartlett|Blackman|Rectangular|Chebyshev',...
      'Value',spec_window);

   spec_pr_sel_h=uicontrol('Style','checkbox',...
      'Position',[150 70 130 30],...
      'String','Select starting point',...
      'Value',freq_spec_mark_flag);

   spec_pr_save_h=uicontrol('Style','pushbutton',...
      'Position',[10 20 130 30],...
      'String','Apply',...
      'Callback','fr_pr_ok');

   spec_pr_cancel_h=uicontrol('Style','pushbutton',...
      'Position',[150 20 130 30],...
      'String','Cancel',...
      'Callback','fr_pr_ca');
end;
   

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?