Fs=11e3;
t0=(30)*60;
st=clock;
Nt=fix(t0*Fs*1.2);
y=zeros(1,Nt);
nt=1;
N=fix(stdchoose(15,5)+1);
T=fix(stdchoose(40,10)/2);
d0=.3+.7*rand;
disp(round([100*d0 N T d0*N/(T+d0*N)*100]));
while(nt<fix(Nt/1.02))
   
  for n=0:N-1
    d=d0;
    off=d/2;
    f=440;
    A=1;
    t=0:1/Fs:d;
    y(nt+(1:length(t)))=A*exp(-((t-off)/.04).^2).*sin(2*pi*f*t)/2;
    nt=nt+length(t);
  end
  t=0:1/Fs:T;
  y(nt+(1:length(t)))=0;
  nt=nt+length(t);
end
wavwrite(y,Fs,'randsnd');
