% test myfft code
m = 10; 
N = 2^m;

% generate a random signal
x = randn(N,1) + 1i*randn(N,1);

% FFT using matlab's builtin function
X1 = fft(x);

% FFT using our function
X2 = myfft(x);

% comparison
fprintf('should be small = %g\n',norm(X1-N*X2));
