syndpy03.m

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

M
92
字号
% syndpy03.m

figure(syn_win2_h);

subplot(2,3,1)
axis('off');
ss=sprintf('Total target frame no.: ');
text(-0.08,1.0,ss,'color',TEXT_COLOR,'FontSize',10);
%text(0.83,1.0,int2str(totfno),'color',TEXT_COLOR,'FontSize',10);
text(0.85,1.0,int2str(totfno),'color',TEXT_COLOR,'FontSize',10);
ss=sprintf('Current target frame no.: ');
text(-0.08,0.9,ss,'color',TEXT_COLOR,'FontSize',10);
%text(0.91,0.9,int2str(vfno),'color',TEXT_COLOR,'FontSize',10);
text(0.93,0.9,int2str(vfno),'color',TEXT_COLOR,'FontSize',10);
ss=sprintf('Frame starting time: ');
text(-0.08,0.8,ss,'color',TEXT_COLOR,'FontSize',10);
text(0.77,0.8,num2str(tartime(vfno)),'color',TEXT_COLOR,'FontSize',10);
ss=sprintf('Frame duration: ');
text(-0.08,0.7,ss,'color',TEXT_COLOR,'FontSize',10);
text(0.63,0.7,num2str(tdur(vfno)),'color',TEXT_COLOR,'FontSize',10);

ss=sprintf('Total excitation frame no.: ');
text(-0.08,0.5,ss,'color',TEXT_COLOR,'FontSize',10);
text(0.99,0.5,int2str(stotfno),'color',TEXT_COLOR,'FontSize',10);
ss=sprintf('Current excitation frame no.: ');
text(-0.08,0.4,ss,'color',TEXT_COLOR,'FontSize',10);
text(1.09,0.4,int2str(sfno),'color',TEXT_COLOR,'FontSize',10);
ss=sprintf('Frame starting time: ');
text(-0.08,0.3,ss,'color',TEXT_COLOR,'FontSize',10);
text(0.77,0.3,num2str(ftime(sfno)),'color',TEXT_COLOR,'FontSize',10);
ss=sprintf('Frame duration: ');
text(-0.08,0.2,ss,'color',TEXT_COLOR,'FontSize',10);
text(0.63,0.2,num2str(fdur(sfno)),'color',TEXT_COLOR,'FontSize',10);

subplot(2,3,2);
[m1,n1]=size(TF);
plot(TF,'color',[0 0 0]);
axis('off');
axis([1 n1 min(TF) max(TF)]);
title('Transfer Function','color',TEXT_COLOR,'FontSize',10);

subplot(2,3,3);
plot([1,1],[min(pulsesamp),max(pulsesamp)],'color',TEXT_COLOR);
plot([1,sampf],[0,0],'color',TEXT_COLOR);
plot(pulsesamp,'color',TEXT_COLOR);
title('Excitation waveform','color',TEXT_COLOR,'FontSize',10);
axis([1 sampf min(pulsesamp) max(pulsesamp)+1e-10]);
axis('off');

subplot(2,3,4);
plot([1,1],[min(sourcepsd),max(sourcepsd)],'color',TEXT_COLOR);
plot([1,512],[0,0],'color',TEXT_COLOR);
plot(sourcepsd,'color',TEXT_COLOR);
title('Excitation PSD','color',TEXT_COLOR,'FontSize',10);
axis('off');
axis([1 512 min(sourcepsd) max(sourcepsd)+1e-10]);


subplot(2,3,5);
axis('off');
axis([1 400 -premax 7*premax]);
title('Pressure (20,30,40,50)','color',TEXT_COLOR,'FontSize',10);
body1 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
body2 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
body3 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
body4 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
set(body4,'xdata',1:plotindex+1,'ydata',presdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,4));
    set(body3,'xdata',1:plotindex+1,'ydata',2*premax+presdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,3));
    set(body2,'xdata',1:plotindex+1,'ydata',4*premax+presdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,2));
    set(body1,'xdata',1:plotindex+1,'ydata',6*premax+presdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,1));
subplot(2,3,6);
axis('off');
axis([1 400 -0.1*volmax 4.3*volmax]);
title('Volume Velocity (20,30,40,50)','color',TEXT_COLOR,'FontSize',10);
body11 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
body12 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
body13 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);
body14 =line('color',[0 0 0],'linestyle','-','erase','normal','xdata',[],'ydata',[]);

set(body14,'xdata',1:plotindex+1,'ydata',uvdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,4));
    set(body13,'xdata',1:plotindex+1,'ydata',1.1*volmax+uvdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,3));
    set(body12,'xdata',1:plotindex+1,'ydata',2.2*volmax+uvdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,2));
    set(body11,'xdata',1:plotindex+1,'ydata',3.3*volmax+uvdpy((currcycle-1)*400+1:(currcycle-1)*400+plotindex+1,1));
drawnow

%subplot(2,3,4);
%plot(0,0);
%subplot(2,3,5);
%plot(0,0);
%subplot(2,3,6);
%plot(0,0);

⌨️ 快捷键说明

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