%This script computes examples of functions with slowly decaying FT
%Number of terms to use
N=2^12;
xx=linspace(0,pi,2*N);
%Rate of the decay of the coefficients
a=1;
moff=0;
coeff=(1+moff:N+moff).^(-a);
%This gives lacunarity of the sequence:
lac=3;
x2=xx'*((1:N).^lac);
c2=cos(x2);
yy=c2*coeff';
figure, plot(xx,yy)
title(['a = ',num2str(a),' lacunarity = ',num2str(lac)])
