plot_excitation.m

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

M
48
字号
%Program to plot the excitation waveform loaded from a file
%Author : Karthik
%

Lens = Lens_array(segment_no);
start_point = (segment_no*Lens) -( Lens-1);
end_point = start_point + Lens -1;

PV = [449 245 338 313];
s2 = 'Source Display Window';
% Open analysis fig
while exist('src_display_fig')==1
   try1 = 'get(src_display_fig,''position'');';
   eval(try1,catch2);
   if check ==0
      clear src_display_fig;
      check = 1;
      break;
   end
   s1 = get(src_display_fig,'Name');
   if ~strcmp(s1,s2)
      clear src_display_fig;
      break;
   end
   figure(src_display_fig);
   break;
end;

if exist('src_display_fig')~=1;
   src_display_fig= figure('Position',PV,...
      'Resize','on',...
      'Numbertitle','off',...
      'Name',s2);
end

subplot(121);
plot(excitation1(start_point:end_point),'b');
xlabel('samples');
title('Excitation Waveform');
subplot(122);
fgp=fft(excitation1(start_point:end_point));
fgp=20*log10(abs(fgp(1:round(Lens/2))));
plot(0:Srate/2/(round(Lens/2)-1):Srate/2,fgp,'b');
xlabel('frequency (Hz)');
ylabel('dB');
title('Excitation Spectrum');

⌨️ 快捷键说明

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