www.pudn.com > voicebox2.zip > GLOTROS.M


function u=glotros(d,t,p) 
%GLOTROS  Rosenberg glottal model U=(D,T,P) 
% d is derivative of flow waveform 
% t is in fractions of a cycle 
% p has parameters 
%	p(1)=closure time 
%	p(2)=+ve/-ve slope ratio 
 
 
 
%      Copyright (C) Mike Brookes 1998 
% 
%      Last modified Fri Apr  3 14:57:14 1998 
% 
%   VOICEBOX home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html 
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%   This program is free software; you can redistribute it and/or modify 
%   it under the terms of the GNU General Public License as published by 
%   the Free Software Foundation; either version 2 of the License, or 
%   (at your option) any later version. 
% 
%   This program is distributed in the hope that it will be useful, 
%   but WITHOUT ANY WARRANTY; without even the implied warranty of 
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
%   GNU General Public License for more details. 
% 
%   You can obtain a copy of the GNU General Public License from 
%   ftp://prep.ai.mit.edu/pub/gnu/COPYING-2.0 or by writing to 
%   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA. 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 
if nargin < 2 
  tt=(0:99)'/100; 
else 
  tt=mod(t,1); 
end 
u=zeros(size(tt)); 
de=[0.6 0.5]'; 
if nargin < 3 
  p=de; 
elseif length(p)<2 
  p=[p(:); de(length(p)+1:2)]; 
end 
pp=p(1)/(1+p(2)); 
ta=tt