function outsig = frand64(ncyc)
% function outsig = frand64(ncyc)

npts=64*ncyc;

outsig=zeros(1,npts);

tmp1 = randsig(npts);
tmp2 = randsig(npts/2);
tmp4 = randsig(npts/4);
tmp8 = randsig(npts/8);
tmp16 = randsig(npts/16);
tmp32 = randsig(npts/32);
tmp64 = randsig(npts/64);

j=1;
k=1;
l=1;
m=1;
n=1;
o=1;
ij=0;
ik=0;
il=0;
im=0;
in=0;
io=0;

for i=1:npts

    ij=ij+1;
    ik=ik+1;
    il=il+1;
    im=im+1;
    in=in+1;
    io=io+1;

    if (ij>2) j=j+1; ij = 1; end;
    if (ik>4) k=k+1; ik = 1; end;
    if (il>8) l=l+1; il = 1; end;
    if (im>16) m=m+1; im = 1; end;
    if (in>32) n=n+1; in = 1; end;
    if (io>64) o=o+1; io = 1; end;

    outsig(i)=tmp1(i)+tmp2(j)+tmp4(k)+tmp8(l)+tmp16(m)+tmp32(n)+tmp64(o);

end;

