% Regression test function (black blox) for FreeMat v4.0
% This function is autogenerated by helpgen.
function bbtest_success = bbtest_fft
  bbtest_success = 1;
NumErrors = 0;
try
  t = linspace(0,2*pi,128);

catch
  NumErrors = NumErrors + 1;
end
try
  x = cos(15*t);

catch
  NumErrors = NumErrors + 1;
end
try
  y = fft(x);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,abs(y));

catch
  NumErrors = NumErrors + 1;
end
try
  mprint('fft1');

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  A = [2,5;3,6]

catch
  NumErrors = NumErrors + 1;
end
try
  real(fft(A,[],1))

catch
  NumErrors = NumErrors + 1;
end
try
  real(fft(A,[],2))

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  delta(1:10) = 1;

catch
  NumErrors = NumErrors + 1;
end
try
  plot((0:255)/256*pi*2,real(fft(delta,256)),'r-');

catch
  NumErrors = NumErrors + 1;
end
try
  hold on

catch
  NumErrors = NumErrors + 1;
end
try
  plot((0:9)/10*pi*2,real(fft(delta)),'go');

catch
  NumErrors = NumErrors + 1;
end
try
  mprint('fft2');

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
