% % generate test data for the FFT project % r = input('enter r for N=2^r > '); N = 2^r; K = input('enter columns K > '); ts = input('enter le or be > ', 's'); % N = 2^15; % FFT size, test data rows % K = 20; % number of test data columns % wtype = 'ieee-be'; % for IBM Power PC % wtype = 'ieee-le'; % for Intel/AMD wtype = ['ieee-', ts]; fin = sprintf('fft_2^%d_%d_%s_in.dat', r, K, ts); fout = sprintf('fft_2^%d_%d_%s_out.dat', r, K, ts); fprintf(1, 'input file = %s\n', fin); fprintf(1, 'output file = %s\n', fout); % generate test data a = complex(randn(N,K), randn(N,K)); % write the input file cxwrite(fin, wtype, a); % do a local calc b = fft(a); % write the output file cxwrite(fout, wtype, b);