Creating a matrix of Gaussian wavelets at dyadic scales I need to create a diagonal matrix containing the Fourier coefficients of the Gaussian wavelet function, but I'm unsure of what to do. 

Currently, I'm using function ConstructHaarWaveletTransformationMatrix to generate the Haar wavelet matrix and am taking the rows at dyadic scales (2, 4, 8, and 16) as the transform:

M = 256
H = ConstructHaarWaveletTransformationMatrix(M);
fi = conj(dftmtx(M))/M;
H = fi*H;
H = H(4,:);
H = diag(H);


etc.

How do I repeat this for Gaussian wavelets? Is there a built-in MATLAB function which will do this for me?

For reference, I'm implementing the algorithm in section 4 of the paper in Compressed Sensing for Wideband Cognitive Radios.

I need to do edge detection on a 1D signal, which is constructed like so:

edges = [50, 120, 170, 200, 220, 224, 256];
levels = [24,3,30,0,36,0,0];
idxs = zeros(1,max(edges));
idxs(edges(1:end-1)+1) = 1;
psd = levels(cumsum(idxs)+1);


When I just wavdec and the differentiation matrix:

[y1,y2] = wavedec(psd, 0, 'haar');
z0 = gamma*y1.';


I get exactly what I want. 

The point, however, is that I want to recreate this edge information compressively (that is, by solving a linear program). 

The fact that using the matrix above creates gibberish is my current sticking point. I want to replace it with something else and see if it still works.
In this case the problem was that I was working in the frequency domain, but implementing an algorithm in the time domain. 

I've removed the pre-multiplications of the Fourier matrix in the time domain and everything works fine.