% check the C program output
% before run this script you must, 
%  1 run 'tb = TB_r2fft()' in matlab cmd line
%  2 execute C testbench and generate the output data file
addpath('../cfftLib/make/');
cfftOut;
MatOut(:,1) = fft(tb.simData.inputData);
diff = CfftOutData-MatOut;
ErrAvg = sum(abs(diff))/length(MatOut)
