function z = gen_sum_of_rand_sines(tmax,delta,n,fmin,fmax,pmin,pmax,wmin,wmax)

f = unifrnd(fmin,fmax,n,1);
p = unifrnd(pmin,pmax,n,1);
w = unifrnd(wmin,wmax,n,1);


t=0:delta:tmax;
z(1:length(t))=0;
for i=1:n,
  z=z+w(i)*gen_sig(tmax,delta,f(i),p(i));
end;

