⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 make_go.m

📁 这是一个用于语音信号处理的工具箱
💻 M
字号:


% % Programmer	:   Ching-Jang  Wu				% 				% Date:   April 28, 1996				% Modified by Karthik on 08/26/97%greatly modified by  D. G. Childers 5/20-22/98
L=MODEL_PARAMETERS(1);W=MODEL_PARAMETERS(2);T=MODEL_PARAMETERS(3);xim=MODEL_PARAMETERS(6);f0=MODEL_PARAMETERS(7);qa=MODEL_PARAMETERS(8);qs=MODEL_PARAMETERS(9);factor=100/W;ny=15;nz=15;fs=10000;xi2=qa*xim*factor;xi1=xi2+(qs*xim)*factor;sy=0:(L/ny):L;sz=0:(T/nz):T;npoint=round(fs/f0);syp=0:200/ny:200;szp=0:50/nz:50;adjx=250;
for iy=0:200       ixs=sqrt(adjx^2-iy^2)-(adjx-200);   rs(iy+1)=ixs;   ls(iy+1)=200-ixs;endstop=[rs', ls'];idx3=0:200;z0ix=zeros(201,1);z1ix=50*ones(201,1);shaptx=stop;shapbx=shaptx;x1=[100-xi1 0 0 100-xi2];y1=[0 0 0 0 ];z1=[0 0 50 50 ];x2=[100+xi1 200 200 100+xi2];y2=[0 0 0 0 ];z2=[0 0 50 50 ];x=[x1',x2'];y=[y1',y2'];z=[z1',z2'];yaxht=max(D_Ag)*1.1;ax=[0 0;npoint+5 0];ay=[0 0;0 yaxht];
PV = [221 45 472 505];
s2 = 'Animation Window';
% Open analysis window
while exist('anim_display_window')==1   try1 = 'get(anim_display_window,''position'');';   eval(try1,catch2);   if check ==0      clear anim_display_window;      check = 1;      break;   end   s1 = get(anim_display_window,'Name');   if ~strcmp(s1,s2)      clear anim_display_window;      break;   end   figure(anim_display_window);   break;end;if exist('anim_display_window')~=1;   anim_display_window=figure('Position',PV,...      'Resize','on',...      'Numbertitle','off',...      'Color',[0 0 0],...      'Name',s2 );end;% plot projected glottal area at upper left and setup axescmw=get(anim_display_window,'Colormap');m1=cmw(1:32,:);cmn=[m1;flipud(m1)];colormap(cmn)anaxh1=axes('position',[0.01 0.83 0.3754 0.15],'Visible','off');plot(ax,ay,'w-');axis offhold ontext(1,yaxht,'Ag');plot(D_Ag,'y-','LineWidth',[0.1],'MarkerSize',[1]);axis([0 npoint 0 yaxht]);anaxh2=axes('position',[0.23 0.47 0.7 0.44],'Visible','off');anaxh3=axes('position',[0.23 0.25 0.7 0.2],'Visible','off');anaxh4=axes('position',[0.15 0.05 0.7 0.2],'Visible','off');color1='w';lim=[0 200 0 200 0 60];MM=moviein(npoint,anim_display_window);idx=1;for nt=1:npoint    posr=D_POSR(idx:((nz+1)*nt),:);    posl=D_POSL(idx:((nz+1)*nt),:);    idx=idx+(nz+1);    axes(anaxh1);    plot(nt,D_Ag(nt),'r.','MarkerSize',[12]);    axis([0 npoint+5 0 yaxht]);    axis off    %plot top view of vocal folds    axes(anaxh2);    plot3(shaptx,idx3,z1ix,color1)    hold on    plot3(shapbx,idx3,z0ix,color1);    plot3(x,y,z,color1);    hgr=surf(szp,syp,posr);    rotate(hgr,[90 0],90,[0 0 100])    hgl=surf(szp,syp,posl);    rotate(hgl,[90 0],90,[0 0 100])    xln=get(hgl,'xdata')+100;    yln=get(hgl,'ydata');    zln=get(hgl,'zdata')-100;    set(hgl,'xdata',xln,'ydata',yln,'zdata',zln)    xrn=get(hgr,'xdata')+100;    yrn=get(hgr,'ydata');    zrn=get(hgr,'zdata')-100;    set(hgr,'xdata',xrn,'ydata',yrn,'zdata',zrn)    axis([0 200 0 200 0 70]);    view(0,90);       %view(20,30);       axis off    hold off    % plot horizontal view of vocal folds looking in from posterior     axes(anaxh3);    plot3(shaptx,idx3,z1ix,color1)    hold on    plot3(shapbx,idx3,z0ix,color1);    plot3(x,y,z,color1);    hgr=surf(szp,syp,posr);    rotate(hgr,[90 0],90,[0 0 100])    hgl=surf(szp,syp,posl);    rotate(hgl,[90 0],90,[0 0 100])    xln=get(hgl,'xdata')+100;
    yln=get(hgl,'ydata');    zln=get(hgl,'zdata')-100;    set(hgl,'xdata',xln,'ydata',yln,'zdata',zln)    xrn=get(hgr,'xdata')+100;    yrn=get(hgr,'ydata');    zrn=get(hgr,'zdata')-100;    set(hgr,'xdata',xrn,'ydata',yrn,'zdata',zrn)    axis([0 200 0 200 0 70]);    view(0,30);       axis off    hold off    %plot rotated horizontal view of vocal folds at an angle     axes(anaxh4);    plot3(shaptx,idx3,z1ix,color1)    hold on    plot3(shapbx,idx3,z0ix,color1);    plot3(x,y,z,color1);    hgr=surf(szp,syp,posr);    rotate(hgr,[90 0],90,[0 0 100])    hgl=surf(szp,syp,posl);    rotate(hgl,[90 0],90,[0 0 100])    xln=get(hgl,'xdata')+100;    yln=get(hgl,'ydata');    zln=get(hgl,'zdata')-100;    set(hgl,'xdata',xln,'ydata',yln,'zdata',zln)    xrn=get(hgr,'xdata')+100;    yrn=get(hgr,'ydata');    zrn=get(hgr,'zdata')-100;    set(hgr,'xdata',xrn,'ydata',yrn,'zdata',zrn)    axis([0 200 0 200 0 70]);    %view(0,30);       axis off    hold off
    MM(:,nt)=getframe(anim_display_window); end
axes(anaxh1);hold off;axes(anaxh2);movie(anim_display_window,MM,20,npoint);

⌨️ 快捷键说明

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